﻿Imports System.Data.SqlClient
Imports MySql.Data.MySqlClient
Public Class frmkhachhang
    Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents btnNew As System.Windows.Forms.Button
    Friend WithEvents btnSave As System.Windows.Forms.Button
    Friend WithEvents btnDelete1 As System.Windows.Forms.Button
    Friend WithEvents BtnClose As System.Windows.Forms.Button
    Friend WithEvents BtnIn As System.Windows.Forms.Button
    Friend WithEvents TxtFax As System.Windows.Forms.TextBox
    Friend WithEvents TxtDienThoai As System.Windows.Forms.TextBox
    Friend WithEvents txtTen_NganHang As System.Windows.Forms.TextBox
    Friend WithEvents txtDiaChi As System.Windows.Forms.TextBox
    Friend WithEvents txtTen_KH As System.Windows.Forms.TextBox
    Friend WithEvents txtMa_KH As System.Windows.Forms.TextBox
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents DataGridView1 As System.Windows.Forms.DataGridView
    Friend WithEvents DiachiDataGridViewTextBoxColumn As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents MakhachhangDataGridViewTextBoxColumn As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents TenkhachhangDataGridViewTextBoxColumn As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents DiachikhachhangDataGridViewTextBoxColumn As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents CboNhom As MTGCComboBox
    Friend WithEvents Label7 As System.Windows.Forms.Label
    Friend WithEvents TxtTen_Nhom As System.Windows.Forms.TextBox
    Friend WithEvents TxtCK As System.Windows.Forms.TextBox
    Friend WithEvents TxtVC As System.Windows.Forms.TextBox
    Friend WithEvents TxtHanNo As System.Windows.Forms.TextBox
    Friend WithEvents Label8 As System.Windows.Forms.Label
    Friend WithEvents Label9 As System.Windows.Forms.Label
    Friend WithEvents Label10 As System.Windows.Forms.Label
    Friend WithEvents Label11 As System.Windows.Forms.Label
    Friend WithEvents TxtMucNo As System.Windows.Forms.TextBox
    Friend WithEvents Label13 As System.Windows.Forms.Label
    Friend WithEvents TxtMST As System.Windows.Forms.TextBox
    Friend WithEvents TxtEmail As System.Windows.Forms.TextBox
    Friend WithEvents Label14 As System.Windows.Forms.Label
    Friend WithEvents Label15 As System.Windows.Forms.Label
    Friend WithEvents CboNganHang As MTGCComboBox
    Friend WithEvents TxtTaiKhoan As System.Windows.Forms.TextBox
    Friend WithEvents Label16 As System.Windows.Forms.Label
    Friend WithEvents Label12 As System.Windows.Forms.Label
    Friend WithEvents CboQuocGia As MTGCComboBox
    Friend WithEvents TxtTen_QuocGia As System.Windows.Forms.TextBox
    Friend WithEvents Label17 As System.Windows.Forms.Label
    Friend WithEvents CboKhuVuc As MTGCComboBox
    Friend WithEvents TxtTen_KhuVuc As System.Windows.Forms.TextBox
    Friend WithEvents Label18 As System.Windows.Forms.Label
    Friend WithEvents CboQuan As MTGCComboBox
    Friend WithEvents TxtTen_Quan As System.Windows.Forms.TextBox
    Friend WithEvents Label19 As System.Windows.Forms.Label
    Friend WithEvents CboTinh As MTGCComboBox
    Friend WithEvents TxtTen_Tinh As System.Windows.Forms.TextBox
    Friend WithEvents TabMain As System.Windows.Forms.TabControl
    Friend WithEvents TabThongtin As System.Windows.Forms.TabPage
    Friend WithEvents DataSetFormDonBindingSource As System.Windows.Forms.BindingSource
    Friend WithEvents DataSetForm_Don As PHUQUI.DataSetForm_Don
    Friend WithEvents Label20 As System.Windows.Forms.Label
    Friend WithEvents txtMaSoThue As System.Windows.Forms.TextBox
    Friend WithEvents Label22 As System.Windows.Forms.Label
    Friend WithEvents Label21 As System.Windows.Forms.Label
    Friend WithEvents txtTen As System.Windows.Forms.TextBox
    Friend WithEvents txtMa As System.Windows.Forms.TextBox
    Friend WithEvents Label23 As System.Windows.Forms.Label
    Friend WithEvents txtTenNhom As System.Windows.Forms.TextBox
    Friend WithEvents cboMaNhom As MTGCComboBox
    Friend WithEvents Label24 As System.Windows.Forms.Label
    Friend WithEvents txtMaSearch As System.Windows.Forms.TextBox
    Friend WithEvents btnTimKiem As System.Windows.Forms.Button
    Friend WithEvents txtTenSearch As System.Windows.Forms.TextBox
    Friend WithEvents Label25 As System.Windows.Forms.Label
    Friend WithEvents gridSearch As System.Windows.Forms.DataGridView
    Friend WithEvents DataSetSearchBindingSource As System.Windows.Forms.BindingSource
    Friend WithEvents DataSetSearch As PHUQUI.DataSetSearch
    Friend WithEvents MucnoDataGridViewTextBoxColumn1 As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents ChietkhauDataGridViewTextBoxColumn1 As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents VanchuyenDataGridViewTextBoxColumn1 As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents HannoDataGridViewTextBoxColumn1 As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents txtDSPhuTrach As System.Windows.Forms.TextBox
    Friend WithEvents txtChungNhan As System.Windows.Forms.TextBox
    Friend WithEvents txtDangKy As System.Windows.Forms.TextBox
    Friend WithEvents txtDienTich As System.Windows.Forms.TextBox
    Friend WithEvents Label29 As System.Windows.Forms.Label
    Friend WithEvents Label28 As System.Windows.Forms.Label
    Friend WithEvents Label27 As System.Windows.Forms.Label
    Friend WithEvents Label26 As System.Windows.Forms.Label
    Friend WithEvents ContextMenuStrip1 As System.Windows.Forms.ContextMenuStrip
    Friend WithEvents InDSKháchHàngToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents ToolStripSeparator1 As System.Windows.Forms.ToolStripSeparator
    Friend WithEvents InDSKháchHàngGDPToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents Label35 As System.Windows.Forms.Label
    Friend WithEvents txtMatructhuoc As System.Windows.Forms.TextBox
    Friend WithEvents gridViewSearch1 As System.Windows.Forms.DataGridView
    Friend WithEvents ma As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents ten As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents TblsearchBindingSource As System.Windows.Forms.BindingSource
    Friend WithEvents txttentructhuoc As System.Windows.Forms.TextBox
    Friend WithEvents Label37 As System.Windows.Forms.Label
    Friend WithEvents Label36 As System.Windows.Forms.Label
    Friend WithEvents LblRecords As System.Windows.Forms.Label
    Friend WithEvents LblRecordSearch As System.Windows.Forms.Label
    Friend WithEvents dsphutrachS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents giaychungnhanS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents giayphepS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents dientichS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents ma_nhacungcapS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents ten_nhacungcapS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents diachi_nhacungcapS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents ma_nhomS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents maso_thueS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents dienthoaiS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents faxS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents emailS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents so_taikhoanS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents ma_quocgiaS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents ma_mienS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents ma_tinhS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents ma_quanS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents ma_nganhangS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents matructhuocS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents tentructhuocS As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colMa As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colTen As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colDiaChi As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colMaNhom As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colMST As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colDT As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colFax As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents colEmail As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents TabTimKiem As System.Windows.Forms.TabPage
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmkhachhang))
        Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle
        Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle
        Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle
        Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle
        Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle
        Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle
        Me.btnSave = New System.Windows.Forms.Button
        Me.btnNew = New System.Windows.Forms.Button
        Me.btnDelete1 = New System.Windows.Forms.Button
        Me.BtnClose = New System.Windows.Forms.Button
        Me.BtnIn = New System.Windows.Forms.Button
        Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
        Me.InDSKháchHàngToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator
        Me.InDSKháchHàngGDPToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.TxtFax = New System.Windows.Forms.TextBox
        Me.TxtDienThoai = New System.Windows.Forms.TextBox
        Me.txtTen_NganHang = New System.Windows.Forms.TextBox
        Me.txtDiaChi = New System.Windows.Forms.TextBox
        Me.txtTen_KH = New System.Windows.Forms.TextBox
        Me.txtMa_KH = New System.Windows.Forms.TextBox
        Me.Label6 = New System.Windows.Forms.Label
        Me.Label5 = New System.Windows.Forms.Label
        Me.Label4 = New System.Windows.Forms.Label
        Me.Label3 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.Label1 = New System.Windows.Forms.Label
        Me.DataGridView1 = New System.Windows.Forms.DataGridView
        Me.colMa = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colTen = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colDiaChi = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colMaNhom = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colMST = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colDT = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colFax = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.colEmail = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.DataSetFormDonBindingSource = New System.Windows.Forms.BindingSource(Me.components)
        Me.DataSetForm_Don = New PHUQUI.DataSetForm_Don
        Me.CboNhom = New MTGCComboBox
        Me.Label7 = New System.Windows.Forms.Label
        Me.TxtTen_Nhom = New System.Windows.Forms.TextBox
        Me.TxtCK = New System.Windows.Forms.TextBox
        Me.TxtVC = New System.Windows.Forms.TextBox
        Me.TxtHanNo = New System.Windows.Forms.TextBox
        Me.Label8 = New System.Windows.Forms.Label
        Me.Label9 = New System.Windows.Forms.Label
        Me.Label10 = New System.Windows.Forms.Label
        Me.Label11 = New System.Windows.Forms.Label
        Me.TxtMucNo = New System.Windows.Forms.TextBox
        Me.Label13 = New System.Windows.Forms.Label
        Me.TxtMST = New System.Windows.Forms.TextBox
        Me.TxtEmail = New System.Windows.Forms.TextBox
        Me.Label14 = New System.Windows.Forms.Label
        Me.Label15 = New System.Windows.Forms.Label
        Me.CboNganHang = New MTGCComboBox
        Me.TxtTaiKhoan = New System.Windows.Forms.TextBox
        Me.Label16 = New System.Windows.Forms.Label
        Me.Label12 = New System.Windows.Forms.Label
        Me.CboQuocGia = New MTGCComboBox
        Me.TxtTen_QuocGia = New System.Windows.Forms.TextBox
        Me.Label17 = New System.Windows.Forms.Label
        Me.CboKhuVuc = New MTGCComboBox
        Me.TxtTen_KhuVuc = New System.Windows.Forms.TextBox
        Me.Label18 = New System.Windows.Forms.Label
        Me.CboQuan = New MTGCComboBox
        Me.TxtTen_Quan = New System.Windows.Forms.TextBox
        Me.Label19 = New System.Windows.Forms.Label
        Me.CboTinh = New MTGCComboBox
        Me.TxtTen_Tinh = New System.Windows.Forms.TextBox
        Me.TabMain = New System.Windows.Forms.TabControl
        Me.TabThongtin = New System.Windows.Forms.TabPage
        Me.LblRecords = New System.Windows.Forms.Label
        Me.Label22 = New System.Windows.Forms.Label
        Me.Label21 = New System.Windows.Forms.Label
        Me.txtTen = New System.Windows.Forms.TextBox
        Me.txtMa = New System.Windows.Forms.TextBox
        Me.Label20 = New System.Windows.Forms.Label
        Me.txtMaSoThue = New System.Windows.Forms.TextBox
        Me.cboMaNhom = New MTGCComboBox
        Me.txtTenNhom = New System.Windows.Forms.TextBox
        Me.Label23 = New System.Windows.Forms.Label
        Me.TabTimKiem = New System.Windows.Forms.TabPage
        Me.LblRecordSearch = New System.Windows.Forms.Label
        Me.Label37 = New System.Windows.Forms.Label
        Me.Label36 = New System.Windows.Forms.Label
        Me.txtMaSearch = New System.Windows.Forms.TextBox
        Me.txtTenSearch = New System.Windows.Forms.TextBox
        Me.Label24 = New System.Windows.Forms.Label
        Me.btnTimKiem = New System.Windows.Forms.Button
        Me.Label25 = New System.Windows.Forms.Label
        Me.gridSearch = New System.Windows.Forms.DataGridView
        Me.dsphutrachS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.giaychungnhanS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.giayphepS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.dientichS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.ma_nhacungcapS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.ten_nhacungcapS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.diachi_nhacungcapS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.ma_nhomS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.maso_thueS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.dienthoaiS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.faxS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.emailS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.so_taikhoanS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.ma_quocgiaS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.ma_mienS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.ma_tinhS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.ma_quanS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.ma_nganhangS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.matructhuocS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.tentructhuocS = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.DataSetSearchBindingSource = New System.Windows.Forms.BindingSource(Me.components)
        Me.DataSetSearch = New PHUQUI.DataSetSearch
        Me.gridViewSearch1 = New System.Windows.Forms.DataGridView
        Me.ma = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.ten = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.TblsearchBindingSource = New System.Windows.Forms.BindingSource(Me.components)
        Me.Label35 = New System.Windows.Forms.Label
        Me.txtMatructhuoc = New System.Windows.Forms.TextBox
        Me.txtDienTich = New System.Windows.Forms.TextBox
        Me.Label29 = New System.Windows.Forms.Label
        Me.Label28 = New System.Windows.Forms.Label
        Me.Label27 = New System.Windows.Forms.Label
        Me.Label26 = New System.Windows.Forms.Label
        Me.txtDSPhuTrach = New System.Windows.Forms.TextBox
        Me.txtChungNhan = New System.Windows.Forms.TextBox
        Me.txtDangKy = New System.Windows.Forms.TextBox
        Me.txttentructhuoc = New System.Windows.Forms.TextBox
        Me.ContextMenuStrip1.SuspendLayout()
        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DataSetFormDonBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DataSetForm_Don, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.TabMain.SuspendLayout()
        Me.TabThongtin.SuspendLayout()
        Me.TabTimKiem.SuspendLayout()
        CType(Me.gridSearch, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DataSetSearchBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DataSetSearch, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.gridViewSearch1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.TblsearchBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'btnSave
        '
        Me.btnSave.BackColor = System.Drawing.Color.Transparent
        Me.btnSave.Image = CType(resources.GetObject("btnSave.Image"), System.Drawing.Image)
        Me.btnSave.Location = New System.Drawing.Point(254, 137)
        Me.btnSave.Name = "btnSave"
        Me.btnSave.Size = New System.Drawing.Size(88, 24)
        Me.btnSave.TabIndex = 19
        Me.btnSave.UseVisualStyleBackColor = False
        '
        'btnNew
        '
        Me.btnNew.Image = CType(resources.GetObject("btnNew.Image"), System.Drawing.Image)
        Me.btnNew.Location = New System.Drawing.Point(152, 137)
        Me.btnNew.Name = "btnNew"
        Me.btnNew.Size = New System.Drawing.Size(88, 24)
        Me.btnNew.TabIndex = 19
        '
        'btnDelete1
        '
        Me.btnDelete1.Image = CType(resources.GetObject("btnDelete1.Image"), System.Drawing.Image)
        Me.btnDelete1.Location = New System.Drawing.Point(357, 137)
        Me.btnDelete1.Name = "btnDelete1"
        Me.btnDelete1.Size = New System.Drawing.Size(88, 24)
        Me.btnDelete1.TabIndex = 29
        '
        'BtnClose
        '
        Me.BtnClose.Image = CType(resources.GetObject("BtnClose.Image"), System.Drawing.Image)
        Me.BtnClose.Location = New System.Drawing.Point(566, 137)
        Me.BtnClose.Name = "BtnClose"
        Me.BtnClose.Size = New System.Drawing.Size(88, 24)
        Me.BtnClose.TabIndex = 30
        '
        'BtnIn
        '
        Me.BtnIn.ContextMenuStrip = Me.ContextMenuStrip1
        Me.BtnIn.Image = CType(resources.GetObject("BtnIn.Image"), System.Drawing.Image)
        Me.BtnIn.Location = New System.Drawing.Point(463, 137)
        Me.BtnIn.Name = "BtnIn"
        Me.BtnIn.Size = New System.Drawing.Size(88, 24)
        Me.BtnIn.TabIndex = 20
        '
        'ContextMenuStrip1
        '
        Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.InDSKháchHàngToolStripMenuItem, Me.ToolStripSeparator1, Me.InDSKháchHàngGDPToolStripMenuItem})
        Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
        Me.ContextMenuStrip1.Size = New System.Drawing.Size(195, 54)
        '
        'InDSKháchHàngToolStripMenuItem
        '
        Me.InDSKháchHàngToolStripMenuItem.Name = "InDSKháchHàngToolStripMenuItem"
        Me.InDSKháchHàngToolStripMenuItem.Size = New System.Drawing.Size(194, 22)
        Me.InDSKháchHàngToolStripMenuItem.Text = "In DS Khách hàng"
        '
        'ToolStripSeparator1
        '
        Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
        Me.ToolStripSeparator1.Size = New System.Drawing.Size(191, 6)
        '
        'InDSKháchHàngGDPToolStripMenuItem
        '
        Me.InDSKháchHàngGDPToolStripMenuItem.Name = "InDSKháchHàngGDPToolStripMenuItem"
        Me.InDSKháchHàngGDPToolStripMenuItem.Size = New System.Drawing.Size(194, 22)
        Me.InDSKháchHàngGDPToolStripMenuItem.Text = "In DS Khách Hàng GDP"
        '
        'TxtFax
        '
        Me.TxtFax.AccessibleRole = System.Windows.Forms.AccessibleRole.OutlineButton
        Me.TxtFax.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtFax.Location = New System.Drawing.Point(478, 59)
        Me.TxtFax.MaxLength = 50
        Me.TxtFax.Name = "TxtFax"
        Me.TxtFax.Size = New System.Drawing.Size(352, 22)
        Me.TxtFax.TabIndex = 9
        '
        'TxtDienThoai
        '
        Me.TxtDienThoai.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtDienThoai.Location = New System.Drawing.Point(76, 59)
        Me.TxtDienThoai.MaxLength = 50
        Me.TxtDienThoai.Name = "TxtDienThoai"
        Me.TxtDienThoai.Size = New System.Drawing.Size(352, 22)
        Me.TxtDienThoai.TabIndex = 8
        '
        'txtTen_NganHang
        '
        Me.txtTen_NganHang.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtTen_NganHang.Location = New System.Drawing.Point(155, 95)
        Me.txtTen_NganHang.MaxLength = 50
        Me.txtTen_NganHang.Name = "txtTen_NganHang"
        Me.txtTen_NganHang.Size = New System.Drawing.Size(21, 22)
        Me.txtTen_NganHang.TabIndex = 101
        Me.txtTen_NganHang.Visible = False
        '
        'txtDiaChi
        '
        Me.txtDiaChi.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtDiaChi.Location = New System.Drawing.Point(75, 34)
        Me.txtDiaChi.MaxLength = 100
        Me.txtDiaChi.Name = "txtDiaChi"
        Me.txtDiaChi.Size = New System.Drawing.Size(755, 22)
        Me.txtDiaChi.TabIndex = 6
        '
        'txtTen_KH
        '
        Me.txtTen_KH.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtTen_KH.Location = New System.Drawing.Point(85, -74)
        Me.txtTen_KH.MaxLength = 50
        Me.txtTen_KH.Name = "txtTen_KH"
        Me.txtTen_KH.Size = New System.Drawing.Size(376, 22)
        Me.txtTen_KH.TabIndex = 2
        '
        'txtMa_KH
        '
        Me.txtMa_KH.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtMa_KH.Location = New System.Drawing.Point(85, -102)
        Me.txtMa_KH.MaxLength = 10
        Me.txtMa_KH.Name = "txtMa_KH"
        Me.txtMa_KH.Size = New System.Drawing.Size(122, 22)
        Me.txtMa_KH.TabIndex = 1
        '
        'Label6
        '
        Me.Label6.Location = New System.Drawing.Point(439, 59)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(27, 22)
        Me.Label6.TabIndex = 68
        Me.Label6.Text = "Fax"
        Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'Label5
        '
        Me.Label5.Location = New System.Drawing.Point(11, 59)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(61, 22)
        Me.Label5.TabIndex = 67
        Me.Label5.Text = "Điện thoại"
        Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label4
        '
        Me.Label4.Location = New System.Drawing.Point(11, 32)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(61, 22)
        Me.Label4.TabIndex = 64
        Me.Label4.Text = "Địa chỉ "
        Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label3
        '
        Me.Label3.Location = New System.Drawing.Point(-5, -71)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(88, 18)
        Me.Label3.TabIndex = 63
        Me.Label3.Text = "Tên Khách hàng"
        Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(1, -102)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(82, 21)
        Me.Label2.TabIndex = 62
        Me.Label2.Text = "Mã Khách hàng"
        Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label1
        '
        Me.Label1.BackColor = System.Drawing.Color.Transparent
        Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label1.Location = New System.Drawing.Point(152, 9)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(498, 24)
        Me.Label1.TabIndex = 60
        Me.Label1.Text = "DANH MỤC KHÁCH HÀNG / NHÀ CUNG CẤP"
        '
        'DataGridView1
        '
        Me.DataGridView1.AllowUserToAddRows = False
        Me.DataGridView1.AllowUserToDeleteRows = False
        Me.DataGridView1.AllowUserToResizeColumns = False
        Me.DataGridView1.AutoGenerateColumns = False
        Me.DataGridView1.BackgroundColor = System.Drawing.Color.LightBlue
        DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter
        DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control
        DataGridViewCellStyle1.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText
        DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight
        DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText
        DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
        Me.DataGridView1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1
        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
        Me.DataGridView1.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.colMa, Me.colTen, Me.colDiaChi, Me.colMaNhom, Me.colMST, Me.colDT, Me.colFax, Me.colEmail})
        Me.DataGridView1.DataMember = "tbl_khachhang"
        Me.DataGridView1.DataSource = Me.DataSetFormDonBindingSource
        Me.DataGridView1.Location = New System.Drawing.Point(3, 167)
        Me.DataGridView1.Name = "DataGridView1"
        Me.DataGridView1.ReadOnly = True
        Me.DataGridView1.RowHeadersWidth = 25
        Me.DataGridView1.Size = New System.Drawing.Size(880, 354)
        Me.DataGridView1.TabIndex = 75
        '
        'colMa
        '
        Me.colMa.DataPropertyName = "ma_nhacungcap"
        Me.colMa.HeaderText = "Mã KH"
        Me.colMa.Name = "colMa"
        Me.colMa.ReadOnly = True
        Me.colMa.Width = 80
        '
        'colTen
        '
        Me.colTen.DataPropertyName = "ten_nhacungcap"
        Me.colTen.HeaderText = "Tên KH"
        Me.colTen.Name = "colTen"
        Me.colTen.ReadOnly = True
        Me.colTen.Width = 280
        '
        'colDiaChi
        '
        Me.colDiaChi.DataPropertyName = "diachi_nhacungcap"
        Me.colDiaChi.HeaderText = "Địa chỉ"
        Me.colDiaChi.Name = "colDiaChi"
        Me.colDiaChi.ReadOnly = True
        Me.colDiaChi.Width = 150
        '
        'colMaNhom
        '
        Me.colMaNhom.DataPropertyName = "ma_nhom"
        DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter
        Me.colMaNhom.DefaultCellStyle = DataGridViewCellStyle2
        Me.colMaNhom.HeaderText = "Nhóm"
        Me.colMaNhom.Name = "colMaNhom"
        Me.colMaNhom.ReadOnly = True
        Me.colMaNhom.Width = 50
        '
        'colMST
        '
        Me.colMST.DataPropertyName = "maso_thue"
        Me.colMST.HeaderText = "MST"
        Me.colMST.Name = "colMST"
        Me.colMST.ReadOnly = True
        Me.colMST.Width = 90
        '
        'colDT
        '
        Me.colDT.DataPropertyName = "dienthoai"
        DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight
        Me.colDT.DefaultCellStyle = DataGridViewCellStyle3
        Me.colDT.HeaderText = "DT"
        Me.colDT.Name = "colDT"
        Me.colDT.ReadOnly = True
        Me.colDT.Width = 60
        '
        'colFax
        '
        Me.colFax.DataPropertyName = "fax"
        Me.colFax.HeaderText = "FAX"
        Me.colFax.Name = "colFax"
        Me.colFax.ReadOnly = True
        Me.colFax.Width = 60
        '
        'colEmail
        '
        Me.colEmail.DataPropertyName = "email"
        Me.colEmail.HeaderText = "Ẹmail"
        Me.colEmail.Name = "colEmail"
        Me.colEmail.ReadOnly = True
        Me.colEmail.Width = 60
        '
        'DataSetFormDonBindingSource
        '
        Me.DataSetFormDonBindingSource.DataSource = Me.DataSetForm_Don
        Me.DataSetFormDonBindingSource.Position = 0
        '
        'DataSetForm_Don
        '
        Me.DataSetForm_Don.DataSetName = "DataSetForm_Don"
        Me.DataSetForm_Don.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
        '
        'CboNhom
        '
        Me.CboNhom.ArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboNhom.ArrowColor = System.Drawing.Color.Black
        Me.CboNhom.BindedControl = Nothing
        Me.CboNhom.BorderStyle = MTGCComboBox.TipiBordi.Fixed3D
        Me.CboNhom.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal
        Me.CboNhom.ColumnNum = 1
        Me.CboNhom.ColumnWidth = "121"
        Me.CboNhom.DisabledArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboNhom.DisabledArrowColor = System.Drawing.Color.LightGray
        Me.CboNhom.DisabledBackColor = System.Drawing.SystemColors.Control
        Me.CboNhom.DisabledBorderColor = System.Drawing.SystemColors.InactiveBorder
        Me.CboNhom.DisabledForeColor = System.Drawing.SystemColors.GrayText
        Me.CboNhom.DisplayMember = "Text"
        Me.CboNhom.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.CboNhom.DropDownBackColor = System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(210, Byte), Integer), CType(CType(238, Byte), Integer))
        Me.CboNhom.DropDownForeColor = System.Drawing.Color.Black
        Me.CboNhom.DropDownStyle = MTGCComboBox.CustomDropDownStyle.DropDown
        Me.CboNhom.DropDownWidth = 141
        Me.CboNhom.GridLineColor = System.Drawing.Color.LightGray
        Me.CboNhom.GridLineHorizontal = False
        Me.CboNhom.GridLineVertical = False
        Me.CboNhom.LoadingType = MTGCComboBox.CaricamentoCombo.ComboBoxItem
        Me.CboNhom.Location = New System.Drawing.Point(86, -129)
        Me.CboNhom.ManagingFastMouseMoving = True
        Me.CboNhom.ManagingFastMouseMovingInterval = 30
        Me.CboNhom.Name = "CboNhom"
        Me.CboNhom.SelectedItem = Nothing
        Me.CboNhom.SelectedValue = Nothing
        Me.CboNhom.Size = New System.Drawing.Size(121, 21)
        Me.CboNhom.TabIndex = 76
        '
        'Label7
        '
        Me.Label7.Location = New System.Drawing.Point(6, -129)
        Me.Label7.Name = "Label7"
        Me.Label7.Size = New System.Drawing.Size(78, 21)
        Me.Label7.TabIndex = 77
        Me.Label7.Text = "Mã Nhóm KH"
        Me.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'TxtTen_Nhom
        '
        Me.TxtTen_Nhom.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtTen_Nhom.Location = New System.Drawing.Point(201, 125)
        Me.TxtTen_Nhom.MaxLength = 50
        Me.TxtTen_Nhom.Name = "TxtTen_Nhom"
        Me.TxtTen_Nhom.Size = New System.Drawing.Size(39, 22)
        Me.TxtTen_Nhom.TabIndex = 78
        Me.TxtTen_Nhom.Visible = False
        '
        'TxtCK
        '
        Me.TxtCK.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtCK.Location = New System.Drawing.Point(254, -101)
        Me.TxtCK.MaxLength = 10
        Me.TxtCK.Name = "TxtCK"
        Me.TxtCK.Size = New System.Drawing.Size(29, 22)
        Me.TxtCK.TabIndex = 79
        '
        'TxtVC
        '
        Me.TxtVC.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtVC.Location = New System.Drawing.Point(330, -101)
        Me.TxtVC.MaxLength = 10
        Me.TxtVC.Name = "TxtVC"
        Me.TxtVC.Size = New System.Drawing.Size(32, 22)
        Me.TxtVC.TabIndex = 80
        '
        'TxtHanNo
        '
        Me.TxtHanNo.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtHanNo.Location = New System.Drawing.Point(424, -101)
        Me.TxtHanNo.MaxLength = 10
        Me.TxtHanNo.Name = "TxtHanNo"
        Me.TxtHanNo.Size = New System.Drawing.Size(36, 22)
        Me.TxtHanNo.TabIndex = 81
        '
        'Label8
        '
        Me.Label8.Location = New System.Drawing.Point(212, -99)
        Me.Label8.Name = "Label8"
        Me.Label8.Size = New System.Drawing.Size(40, 21)
        Me.Label8.TabIndex = 82
        Me.Label8.Text = "CK(%)"
        Me.Label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'Label9
        '
        Me.Label9.Location = New System.Drawing.Point(289, -101)
        Me.Label9.Name = "Label9"
        Me.Label9.Size = New System.Drawing.Size(40, 21)
        Me.Label9.TabIndex = 83
        Me.Label9.Text = "VC(%)"
        Me.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'Label10
        '
        Me.Label10.Location = New System.Drawing.Point(369, -99)
        Me.Label10.Name = "Label10"
        Me.Label10.Size = New System.Drawing.Size(48, 21)
        Me.Label10.TabIndex = 84
        Me.Label10.Text = "Hạn Nợ"
        Me.Label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'Label11
        '
        Me.Label11.Location = New System.Drawing.Point(466, -101)
        Me.Label11.Name = "Label11"
        Me.Label11.Size = New System.Drawing.Size(57, 21)
        Me.Label11.TabIndex = 86
        Me.Label11.Text = "Mức Nợ"
        Me.Label11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'TxtMucNo
        '
        Me.TxtMucNo.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtMucNo.Location = New System.Drawing.Point(520, -100)
        Me.TxtMucNo.MaxLength = 10
        Me.TxtMucNo.Name = "TxtMucNo"
        Me.TxtMucNo.Size = New System.Drawing.Size(135, 22)
        Me.TxtMucNo.TabIndex = 85
        '
        'Label13
        '
        Me.Label13.Location = New System.Drawing.Point(471, -73)
        Me.Label13.Name = "Label13"
        Me.Label13.Size = New System.Drawing.Size(43, 21)
        Me.Label13.TabIndex = 88
        Me.Label13.Text = "MST"
        Me.Label13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'TxtMST
        '
        Me.TxtMST.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtMST.Location = New System.Drawing.Point(520, -73)
        Me.TxtMST.MaxLength = 10
        Me.TxtMST.Name = "TxtMST"
        Me.TxtMST.Size = New System.Drawing.Size(135, 22)
        Me.TxtMST.TabIndex = 87
        '
        'TxtEmail
        '
        Me.TxtEmail.AccessibleRole = System.Windows.Forms.AccessibleRole.OutlineButton
        Me.TxtEmail.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtEmail.Location = New System.Drawing.Point(478, 84)
        Me.TxtEmail.MaxLength = 50
        Me.TxtEmail.Name = "TxtEmail"
        Me.TxtEmail.Size = New System.Drawing.Size(352, 22)
        Me.TxtEmail.TabIndex = 10
        '
        'Label14
        '
        Me.Label14.Location = New System.Drawing.Point(432, 79)
        Me.Label14.Name = "Label14"
        Me.Label14.Size = New System.Drawing.Size(44, 22)
        Me.Label14.TabIndex = 90
        Me.Label14.Text = "Email"
        Me.Label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'Label15
        '
        Me.Label15.Location = New System.Drawing.Point(171, 99)
        Me.Label15.Name = "Label15"
        Me.Label15.Size = New System.Drawing.Size(34, 19)
        Me.Label15.TabIndex = 92
        Me.Label15.Text = "Ngân hàng"
        Me.Label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        Me.Label15.Visible = False
        '
        'CboNganHang
        '
        Me.CboNganHang.ArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboNganHang.ArrowColor = System.Drawing.Color.Black
        Me.CboNganHang.BindedControl = Nothing
        Me.CboNganHang.BorderStyle = MTGCComboBox.TipiBordi.Fixed3D
        Me.CboNganHang.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal
        Me.CboNganHang.ColumnNum = 1
        Me.CboNganHang.ColumnWidth = "121"
        Me.CboNganHang.DisabledArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboNganHang.DisabledArrowColor = System.Drawing.Color.LightGray
        Me.CboNganHang.DisabledBackColor = System.Drawing.SystemColors.Control
        Me.CboNganHang.DisabledBorderColor = System.Drawing.SystemColors.InactiveBorder
        Me.CboNganHang.DisabledForeColor = System.Drawing.SystemColors.GrayText
        Me.CboNganHang.DisplayMember = "Text"
        Me.CboNganHang.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.CboNganHang.DropDownBackColor = System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(210, Byte), Integer), CType(CType(238, Byte), Integer))
        Me.CboNganHang.DropDownForeColor = System.Drawing.Color.Black
        Me.CboNganHang.DropDownStyle = MTGCComboBox.CustomDropDownStyle.DropDown
        Me.CboNganHang.DropDownWidth = 141
        Me.CboNganHang.GridLineColor = System.Drawing.Color.LightGray
        Me.CboNganHang.GridLineHorizontal = False
        Me.CboNganHang.GridLineVertical = False
        Me.CboNganHang.LoadingType = MTGCComboBox.CaricamentoCombo.ComboBoxItem
        Me.CboNganHang.Location = New System.Drawing.Point(211, 99)
        Me.CboNganHang.ManagingFastMouseMoving = True
        Me.CboNganHang.ManagingFastMouseMovingInterval = 30
        Me.CboNganHang.Name = "CboNganHang"
        Me.CboNganHang.SelectedItem = Nothing
        Me.CboNganHang.SelectedValue = Nothing
        Me.CboNganHang.Size = New System.Drawing.Size(29, 21)
        Me.CboNganHang.TabIndex = 11
        Me.CboNganHang.Visible = False
        '
        'TxtTaiKhoan
        '
        Me.TxtTaiKhoan.AccessibleRole = System.Windows.Forms.AccessibleRole.OutlineButton
        Me.TxtTaiKhoan.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtTaiKhoan.Location = New System.Drawing.Point(776, 123)
        Me.TxtTaiKhoan.MaxLength = 50
        Me.TxtTaiKhoan.Name = "TxtTaiKhoan"
        Me.TxtTaiKhoan.Size = New System.Drawing.Size(18, 22)
        Me.TxtTaiKhoan.TabIndex = 12
        Me.TxtTaiKhoan.Visible = False
        '
        'Label16
        '
        Me.Label16.Location = New System.Drawing.Point(748, 125)
        Me.Label16.Name = "Label16"
        Me.Label16.Size = New System.Drawing.Size(22, 19)
        Me.Label16.TabIndex = 94
        Me.Label16.Text = "TK số"
        Me.Label16.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        Me.Label16.Visible = False
        '
        'Label12
        '
        Me.Label12.Location = New System.Drawing.Point(78, 99)
        Me.Label12.Name = "Label12"
        Me.Label12.Size = New System.Drawing.Size(12, 19)
        Me.Label12.TabIndex = 97
        Me.Label12.Text = "Tên Q.Gia"
        Me.Label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        Me.Label12.Visible = False
        '
        'CboQuocGia
        '
        Me.CboQuocGia.ArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboQuocGia.ArrowColor = System.Drawing.Color.Black
        Me.CboQuocGia.BindedControl = Nothing
        Me.CboQuocGia.BorderStyle = MTGCComboBox.TipiBordi.Fixed3D
        Me.CboQuocGia.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal
        Me.CboQuocGia.ColumnNum = 1
        Me.CboQuocGia.ColumnWidth = "121"
        Me.CboQuocGia.DisabledArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboQuocGia.DisabledArrowColor = System.Drawing.Color.LightGray
        Me.CboQuocGia.DisabledBackColor = System.Drawing.SystemColors.Control
        Me.CboQuocGia.DisabledBorderColor = System.Drawing.SystemColors.InactiveBorder
        Me.CboQuocGia.DisabledForeColor = System.Drawing.SystemColors.GrayText
        Me.CboQuocGia.DisplayMember = "Text"
        Me.CboQuocGia.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.CboQuocGia.DropDownBackColor = System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(210, Byte), Integer), CType(CType(238, Byte), Integer))
        Me.CboQuocGia.DropDownForeColor = System.Drawing.Color.Black
        Me.CboQuocGia.DropDownStyle = MTGCComboBox.CustomDropDownStyle.DropDown
        Me.CboQuocGia.DropDownWidth = 141
        Me.CboQuocGia.GridLineColor = System.Drawing.Color.LightGray
        Me.CboQuocGia.GridLineHorizontal = False
        Me.CboQuocGia.GridLineVertical = False
        Me.CboQuocGia.LoadingType = MTGCComboBox.CaricamentoCombo.ComboBoxItem
        Me.CboQuocGia.Location = New System.Drawing.Point(123, 97)
        Me.CboQuocGia.ManagingFastMouseMoving = True
        Me.CboQuocGia.ManagingFastMouseMovingInterval = 30
        Me.CboQuocGia.Name = "CboQuocGia"
        Me.CboQuocGia.SelectedItem = Nothing
        Me.CboQuocGia.SelectedValue = Nothing
        Me.CboQuocGia.Size = New System.Drawing.Size(26, 21)
        Me.CboQuocGia.TabIndex = 15
        Me.CboQuocGia.Visible = False
        '
        'TxtTen_QuocGia
        '
        Me.TxtTen_QuocGia.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtTen_QuocGia.Location = New System.Drawing.Point(96, 96)
        Me.TxtTen_QuocGia.MaxLength = 50
        Me.TxtTen_QuocGia.Name = "TxtTen_QuocGia"
        Me.TxtTen_QuocGia.Size = New System.Drawing.Size(21, 22)
        Me.TxtTen_QuocGia.TabIndex = 95
        Me.TxtTen_QuocGia.Visible = False
        '
        'Label17
        '
        Me.Label17.Location = New System.Drawing.Point(576, 123)
        Me.Label17.Name = "Label17"
        Me.Label17.Size = New System.Drawing.Size(11, 19)
        Me.Label17.TabIndex = 100
        Me.Label17.Text = "Khu vực"
        Me.Label17.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        Me.Label17.Visible = False
        '
        'CboKhuVuc
        '
        Me.CboKhuVuc.ArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboKhuVuc.ArrowColor = System.Drawing.Color.Black
        Me.CboKhuVuc.BindedControl = Nothing
        Me.CboKhuVuc.BorderStyle = MTGCComboBox.TipiBordi.Fixed3D
        Me.CboKhuVuc.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal
        Me.CboKhuVuc.ColumnNum = 1
        Me.CboKhuVuc.ColumnWidth = "121"
        Me.CboKhuVuc.DisabledArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboKhuVuc.DisabledArrowColor = System.Drawing.Color.LightGray
        Me.CboKhuVuc.DisabledBackColor = System.Drawing.SystemColors.Control
        Me.CboKhuVuc.DisabledBorderColor = System.Drawing.SystemColors.InactiveBorder
        Me.CboKhuVuc.DisabledForeColor = System.Drawing.SystemColors.GrayText
        Me.CboKhuVuc.DisplayMember = "Text"
        Me.CboKhuVuc.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.CboKhuVuc.DropDownBackColor = System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(210, Byte), Integer), CType(CType(238, Byte), Integer))
        Me.CboKhuVuc.DropDownForeColor = System.Drawing.Color.Black
        Me.CboKhuVuc.DropDownStyle = MTGCComboBox.CustomDropDownStyle.DropDown
        Me.CboKhuVuc.DropDownWidth = 141
        Me.CboKhuVuc.GridLineColor = System.Drawing.Color.LightGray
        Me.CboKhuVuc.GridLineHorizontal = False
        Me.CboKhuVuc.GridLineVertical = False
        Me.CboKhuVuc.LoadingType = MTGCComboBox.CaricamentoCombo.ComboBoxItem
        Me.CboKhuVuc.Location = New System.Drawing.Point(622, 124)
        Me.CboKhuVuc.ManagingFastMouseMoving = True
        Me.CboKhuVuc.ManagingFastMouseMovingInterval = 30
        Me.CboKhuVuc.Name = "CboKhuVuc"
        Me.CboKhuVuc.SelectedItem = Nothing
        Me.CboKhuVuc.SelectedValue = Nothing
        Me.CboKhuVuc.Size = New System.Drawing.Size(26, 21)
        Me.CboKhuVuc.TabIndex = 16
        Me.CboKhuVuc.Visible = False
        '
        'TxtTen_KhuVuc
        '
        Me.TxtTen_KhuVuc.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtTen_KhuVuc.Location = New System.Drawing.Point(664, 123)
        Me.TxtTen_KhuVuc.MaxLength = 50
        Me.TxtTen_KhuVuc.Name = "TxtTen_KhuVuc"
        Me.TxtTen_KhuVuc.Size = New System.Drawing.Size(21, 22)
        Me.TxtTen_KhuVuc.TabIndex = 98
        Me.TxtTen_KhuVuc.Visible = False
        '
        'Label18
        '
        Me.Label18.Location = New System.Drawing.Point(593, 121)
        Me.Label18.Name = "Label18"
        Me.Label18.Size = New System.Drawing.Size(23, 19)
        Me.Label18.TabIndex = 106
        Me.Label18.Text = "Quận/Huyện"
        Me.Label18.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        Me.Label18.Visible = False
        '
        'CboQuan
        '
        Me.CboQuan.ArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboQuan.ArrowColor = System.Drawing.Color.Black
        Me.CboQuan.BindedControl = Nothing
        Me.CboQuan.BorderStyle = MTGCComboBox.TipiBordi.Fixed3D
        Me.CboQuan.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal
        Me.CboQuan.ColumnNum = 1
        Me.CboQuan.ColumnWidth = "121"
        Me.CboQuan.DisabledArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboQuan.DisabledArrowColor = System.Drawing.Color.LightGray
        Me.CboQuan.DisabledBackColor = System.Drawing.SystemColors.Control
        Me.CboQuan.DisabledBorderColor = System.Drawing.SystemColors.InactiveBorder
        Me.CboQuan.DisabledForeColor = System.Drawing.SystemColors.GrayText
        Me.CboQuan.DisplayMember = "Text"
        Me.CboQuan.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.CboQuan.DropDownBackColor = System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(210, Byte), Integer), CType(CType(238, Byte), Integer))
        Me.CboQuan.DropDownForeColor = System.Drawing.Color.Black
        Me.CboQuan.DropDownStyle = MTGCComboBox.CustomDropDownStyle.DropDown
        Me.CboQuan.DropDownWidth = 141
        Me.CboQuan.GridLineColor = System.Drawing.Color.LightGray
        Me.CboQuan.GridLineHorizontal = False
        Me.CboQuan.GridLineVertical = False
        Me.CboQuan.LoadingType = MTGCComboBox.CaricamentoCombo.ComboBoxItem
        Me.CboQuan.Location = New System.Drawing.Point(715, 125)
        Me.CboQuan.ManagingFastMouseMoving = True
        Me.CboQuan.ManagingFastMouseMovingInterval = 30
        Me.CboQuan.Name = "CboQuan"
        Me.CboQuan.SelectedItem = Nothing
        Me.CboQuan.SelectedValue = Nothing
        Me.CboQuan.Size = New System.Drawing.Size(27, 21)
        Me.CboQuan.TabIndex = 18
        Me.CboQuan.Visible = False
        '
        'TxtTen_Quan
        '
        Me.TxtTen_Quan.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtTen_Quan.Location = New System.Drawing.Point(692, 124)
        Me.TxtTen_Quan.MaxLength = 50
        Me.TxtTen_Quan.Name = "TxtTen_Quan"
        Me.TxtTen_Quan.Size = New System.Drawing.Size(17, 22)
        Me.TxtTen_Quan.TabIndex = 104
        Me.TxtTen_Quan.Visible = False
        '
        'Label19
        '
        Me.Label19.Location = New System.Drawing.Point(71, 123)
        Me.Label19.Name = "Label19"
        Me.Label19.Size = New System.Drawing.Size(19, 19)
        Me.Label19.TabIndex = 103
        Me.Label19.Text = "Tỉnh/Thành"
        Me.Label19.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        Me.Label19.Visible = False
        '
        'CboTinh
        '
        Me.CboTinh.ArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboTinh.ArrowColor = System.Drawing.Color.Black
        Me.CboTinh.BindedControl = Nothing
        Me.CboTinh.BorderStyle = MTGCComboBox.TipiBordi.Fixed3D
        Me.CboTinh.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal
        Me.CboTinh.ColumnNum = 1
        Me.CboTinh.ColumnWidth = "121"
        Me.CboTinh.DisabledArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboTinh.DisabledArrowColor = System.Drawing.Color.LightGray
        Me.CboTinh.DisabledBackColor = System.Drawing.SystemColors.Control
        Me.CboTinh.DisabledBorderColor = System.Drawing.SystemColors.InactiveBorder
        Me.CboTinh.DisabledForeColor = System.Drawing.SystemColors.GrayText
        Me.CboTinh.DisplayMember = "Text"
        Me.CboTinh.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.CboTinh.DropDownBackColor = System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(210, Byte), Integer), CType(CType(238, Byte), Integer))
        Me.CboTinh.DropDownForeColor = System.Drawing.Color.Black
        Me.CboTinh.DropDownStyle = MTGCComboBox.CustomDropDownStyle.DropDown
        Me.CboTinh.DropDownWidth = 141
        Me.CboTinh.GridLineColor = System.Drawing.Color.LightGray
        Me.CboTinh.GridLineHorizontal = False
        Me.CboTinh.GridLineVertical = False
        Me.CboTinh.LoadingType = MTGCComboBox.CaricamentoCombo.ComboBoxItem
        Me.CboTinh.Location = New System.Drawing.Point(123, 121)
        Me.CboTinh.ManagingFastMouseMoving = True
        Me.CboTinh.ManagingFastMouseMovingInterval = 30
        Me.CboTinh.Name = "CboTinh"
        Me.CboTinh.SelectedItem = Nothing
        Me.CboTinh.SelectedValue = Nothing
        Me.CboTinh.Size = New System.Drawing.Size(26, 21)
        Me.CboTinh.TabIndex = 17
        Me.CboTinh.Visible = False
        '
        'TxtTen_Tinh
        '
        Me.TxtTen_Tinh.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtTen_Tinh.Location = New System.Drawing.Point(96, 120)
        Me.TxtTen_Tinh.MaxLength = 50
        Me.TxtTen_Tinh.Name = "TxtTen_Tinh"
        Me.TxtTen_Tinh.Size = New System.Drawing.Size(21, 22)
        Me.TxtTen_Tinh.TabIndex = 101
        Me.TxtTen_Tinh.Visible = False
        '
        'TabMain
        '
        Me.TabMain.Appearance = System.Windows.Forms.TabAppearance.FlatButtons
        Me.TabMain.Controls.Add(Me.TabThongtin)
        Me.TabMain.Controls.Add(Me.TabTimKiem)
        Me.TabMain.Location = New System.Drawing.Point(1, 52)
        Me.TabMain.Name = "TabMain"
        Me.TabMain.SelectedIndex = 0
        Me.TabMain.Size = New System.Drawing.Size(891, 551)
        Me.TabMain.TabIndex = 107
        '
        'TabThongtin
        '
        Me.TabThongtin.BackColor = System.Drawing.Color.LightBlue
        Me.TabThongtin.Controls.Add(Me.LblRecords)
        Me.TabThongtin.Controls.Add(Me.Label22)
        Me.TabThongtin.Controls.Add(Me.Label21)
        Me.TabThongtin.Controls.Add(Me.txtTen)
        Me.TabThongtin.Controls.Add(Me.txtMa)
        Me.TabThongtin.Controls.Add(Me.Label20)
        Me.TabThongtin.Controls.Add(Me.txtMaSoThue)
        Me.TabThongtin.Controls.Add(Me.BtnIn)
        Me.TabThongtin.Controls.Add(Me.btnSave)
        Me.TabThongtin.Controls.Add(Me.btnNew)
        Me.TabThongtin.Controls.Add(Me.btnDelete1)
        Me.TabThongtin.Controls.Add(Me.cboMaNhom)
        Me.TabThongtin.Controls.Add(Me.BtnClose)
        Me.TabThongtin.Controls.Add(Me.Label2)
        Me.TabThongtin.Controls.Add(Me.Label3)
        Me.TabThongtin.Controls.Add(Me.txtTenNhom)
        Me.TabThongtin.Controls.Add(Me.Label23)
        Me.TabThongtin.Controls.Add(Me.Label4)
        Me.TabThongtin.Controls.Add(Me.Label5)
        Me.TabThongtin.Controls.Add(Me.Label6)
        Me.TabThongtin.Controls.Add(Me.txtMa_KH)
        Me.TabThongtin.Controls.Add(Me.txtTen_KH)
        Me.TabThongtin.Controls.Add(Me.txtDiaChi)
        Me.TabThongtin.Controls.Add(Me.TxtDienThoai)
        Me.TabThongtin.Controls.Add(Me.TxtFax)
        Me.TabThongtin.Controls.Add(Me.DataGridView1)
        Me.TabThongtin.Controls.Add(Me.TxtEmail)
        Me.TabThongtin.Controls.Add(Me.CboNhom)
        Me.TabThongtin.Controls.Add(Me.Label14)
        Me.TabThongtin.Controls.Add(Me.Label7)
        Me.TabThongtin.Controls.Add(Me.Label13)
        Me.TabThongtin.Controls.Add(Me.TxtMST)
        Me.TabThongtin.Controls.Add(Me.TxtCK)
        Me.TabThongtin.Controls.Add(Me.Label11)
        Me.TabThongtin.Controls.Add(Me.TxtVC)
        Me.TabThongtin.Controls.Add(Me.TxtMucNo)
        Me.TabThongtin.Controls.Add(Me.TxtHanNo)
        Me.TabThongtin.Controls.Add(Me.Label10)
        Me.TabThongtin.Controls.Add(Me.Label8)
        Me.TabThongtin.Controls.Add(Me.Label9)
        Me.TabThongtin.Location = New System.Drawing.Point(4, 26)
        Me.TabThongtin.Name = "TabThongtin"
        Me.TabThongtin.Padding = New System.Windows.Forms.Padding(3)
        Me.TabThongtin.Size = New System.Drawing.Size(883, 521)
        Me.TabThongtin.TabIndex = 0
        Me.TabThongtin.Text = "Thông tin"
        Me.TabThongtin.UseVisualStyleBackColor = True
        '
        'LblRecords
        '
        Me.LblRecords.AutoSize = True
        Me.LblRecords.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.LblRecords.Location = New System.Drawing.Point(7, 146)
        Me.LblRecords.Name = "LblRecords"
        Me.LblRecords.Size = New System.Drawing.Size(45, 14)
        Me.LblRecords.TabIndex = 1117
        Me.LblRecords.Text = "Label18"
        Me.LblRecords.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
        '
        'Label22
        '
        Me.Label22.Location = New System.Drawing.Point(11, 10)
        Me.Label22.Name = "Label22"
        Me.Label22.Size = New System.Drawing.Size(61, 19)
        Me.Label22.TabIndex = 112
        Me.Label22.Text = "Mã "
        Me.Label22.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label21
        '
        Me.Label21.Location = New System.Drawing.Point(217, 10)
        Me.Label21.Name = "Label21"
        Me.Label21.Size = New System.Drawing.Size(61, 22)
        Me.Label21.TabIndex = 111
        Me.Label21.Text = "Tên "
        Me.Label21.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'txtTen
        '
        Me.txtTen.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtTen.Location = New System.Drawing.Point(283, 10)
        Me.txtTen.MaxLength = 100
        Me.txtTen.Name = "txtTen"
        Me.txtTen.Size = New System.Drawing.Size(547, 22)
        Me.txtTen.TabIndex = 4
        '
        'txtMa
        '
        Me.txtMa.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtMa.Location = New System.Drawing.Point(75, 9)
        Me.txtMa.MaxLength = 100
        Me.txtMa.Name = "txtMa"
        Me.txtMa.Size = New System.Drawing.Size(136, 22)
        Me.txtMa.TabIndex = 0
        '
        'Label20
        '
        Me.Label20.Location = New System.Drawing.Point(9, 83)
        Me.Label20.Name = "Label20"
        Me.Label20.Size = New System.Drawing.Size(63, 19)
        Me.Label20.TabIndex = 108
        Me.Label20.Text = "Mã số thuế"
        Me.Label20.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'txtMaSoThue
        '
        Me.txtMaSoThue.AccessibleRole = System.Windows.Forms.AccessibleRole.OutlineButton
        Me.txtMaSoThue.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtMaSoThue.Location = New System.Drawing.Point(76, 84)
        Me.txtMaSoThue.MaxLength = 50
        Me.txtMaSoThue.Name = "txtMaSoThue"
        Me.txtMaSoThue.Size = New System.Drawing.Size(352, 22)
        Me.txtMaSoThue.TabIndex = 14
        '
        'cboMaNhom
        '
        Me.cboMaNhom.ArrowBoxColor = System.Drawing.SystemColors.Control
        Me.cboMaNhom.ArrowColor = System.Drawing.Color.Black
        Me.cboMaNhom.BindedControl = Nothing
        Me.cboMaNhom.BorderStyle = MTGCComboBox.TipiBordi.Fixed3D
        Me.cboMaNhom.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal
        Me.cboMaNhom.ColumnNum = 1
        Me.cboMaNhom.ColumnWidth = "121"
        Me.cboMaNhom.DisabledArrowBoxColor = System.Drawing.SystemColors.Control
        Me.cboMaNhom.DisabledArrowColor = System.Drawing.Color.LightGray
        Me.cboMaNhom.DisabledBackColor = System.Drawing.SystemColors.Control
        Me.cboMaNhom.DisabledBorderColor = System.Drawing.SystemColors.InactiveBorder
        Me.cboMaNhom.DisabledForeColor = System.Drawing.SystemColors.GrayText
        Me.cboMaNhom.DisplayMember = "Text"
        Me.cboMaNhom.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.cboMaNhom.DropDownBackColor = System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(210, Byte), Integer), CType(CType(238, Byte), Integer))
        Me.cboMaNhom.DropDownForeColor = System.Drawing.Color.Black
        Me.cboMaNhom.DropDownStyle = MTGCComboBox.CustomDropDownStyle.DropDown
        Me.cboMaNhom.DropDownWidth = 141
        Me.cboMaNhom.GridLineColor = System.Drawing.Color.LightGray
        Me.cboMaNhom.GridLineHorizontal = False
        Me.cboMaNhom.GridLineVertical = False
        Me.cboMaNhom.LoadingType = MTGCComboBox.CaricamentoCombo.ComboBoxItem
        Me.cboMaNhom.Location = New System.Drawing.Point(75, 109)
        Me.cboMaNhom.ManagingFastMouseMoving = True
        Me.cboMaNhom.ManagingFastMouseMovingInterval = 30
        Me.cboMaNhom.Name = "cboMaNhom"
        Me.cboMaNhom.SelectedItem = Nothing
        Me.cboMaNhom.SelectedValue = Nothing
        Me.cboMaNhom.Size = New System.Drawing.Size(136, 21)
        Me.cboMaNhom.TabIndex = 13
        '
        'txtTenNhom
        '
        Me.txtTenNhom.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtTenNhom.Location = New System.Drawing.Point(213, 109)
        Me.txtTenNhom.MaxLength = 50
        Me.txtTenNhom.Name = "txtTenNhom"
        Me.txtTenNhom.Size = New System.Drawing.Size(617, 22)
        Me.txtTenNhom.TabIndex = 114
        '
        'Label23
        '
        Me.Label23.Location = New System.Drawing.Point(14, 110)
        Me.Label23.Name = "Label23"
        Me.Label23.Size = New System.Drawing.Size(58, 19)
        Me.Label23.TabIndex = 115
        Me.Label23.Text = "Nhóm "
        Me.Label23.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'TabTimKiem
        '
        Me.TabTimKiem.BackColor = System.Drawing.Color.LightBlue
        Me.TabTimKiem.Controls.Add(Me.LblRecordSearch)
        Me.TabTimKiem.Controls.Add(Me.Label37)
        Me.TabTimKiem.Controls.Add(Me.Label36)
        Me.TabTimKiem.Controls.Add(Me.txtMaSearch)
        Me.TabTimKiem.Controls.Add(Me.txtTenSearch)
        Me.TabTimKiem.Controls.Add(Me.Label24)
        Me.TabTimKiem.Controls.Add(Me.btnTimKiem)
        Me.TabTimKiem.Controls.Add(Me.Label25)
        Me.TabTimKiem.Controls.Add(Me.gridSearch)
        Me.TabTimKiem.Location = New System.Drawing.Point(4, 26)
        Me.TabTimKiem.Name = "TabTimKiem"
        Me.TabTimKiem.Padding = New System.Windows.Forms.Padding(3)
        Me.TabTimKiem.Size = New System.Drawing.Size(883, 521)
        Me.TabTimKiem.TabIndex = 1
        Me.TabTimKiem.Text = "Tìm kiếm"
        Me.TabTimKiem.UseVisualStyleBackColor = True
        '
        'LblRecordSearch
        '
        Me.LblRecordSearch.AutoSize = True
        Me.LblRecordSearch.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.LblRecordSearch.Location = New System.Drawing.Point(7, 70)
        Me.LblRecordSearch.Name = "LblRecordSearch"
        Me.LblRecordSearch.Size = New System.Drawing.Size(50, 14)
        Me.LblRecordSearch.TabIndex = 1118
        Me.LblRecordSearch.Text = "0 mẫu tin"
        Me.LblRecordSearch.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
        '
        'Label37
        '
        Me.Label37.Location = New System.Drawing.Point(77, 34)
        Me.Label37.Name = "Label37"
        Me.Label37.Size = New System.Drawing.Size(124, 19)
        Me.Label37.TabIndex = 124
        Me.Label37.Text = "Tìm theo tên"
        Me.Label37.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label36
        '
        Me.Label36.Location = New System.Drawing.Point(137, 8)
        Me.Label36.Name = "Label36"
        Me.Label36.Size = New System.Drawing.Size(66, 19)
        Me.Label36.TabIndex = 123
        Me.Label36.Text = "Tìm theo mã"
        Me.Label36.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'txtMaSearch
        '
        Me.txtMaSearch.Location = New System.Drawing.Point(207, 6)
        Me.txtMaSearch.Name = "txtMaSearch"
        Me.txtMaSearch.Size = New System.Drawing.Size(341, 20)
        Me.txtMaSearch.TabIndex = 80
        '
        'txtTenSearch
        '
        Me.txtTenSearch.Location = New System.Drawing.Point(207, 32)
        Me.txtTenSearch.Name = "txtTenSearch"
        Me.txtTenSearch.Size = New System.Drawing.Size(341, 20)
        Me.txtTenSearch.TabIndex = 78
        '
        'Label24
        '
        Me.Label24.AutoSize = True
        Me.Label24.Location = New System.Drawing.Point(119, 9)
        Me.Label24.Name = "Label24"
        Me.Label24.Size = New System.Drawing.Size(83, 14)
        Me.Label24.TabIndex = 81
        Me.Label24.Text = "Mã Khách Hàng"
        Me.Label24.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'btnTimKiem
        '
        Me.btnTimKiem.Location = New System.Drawing.Point(268, 58)
        Me.btnTimKiem.Name = "btnTimKiem"
        Me.btnTimKiem.Size = New System.Drawing.Size(105, 23)
        Me.btnTimKiem.TabIndex = 79
        Me.btnTimKiem.Text = "Tìm kiếm..."
        Me.btnTimKiem.UseVisualStyleBackColor = True
        '
        'Label25
        '
        Me.Label25.AutoSize = True
        Me.Label25.Location = New System.Drawing.Point(115, 35)
        Me.Label25.Name = "Label25"
        Me.Label25.Size = New System.Drawing.Size(87, 14)
        Me.Label25.TabIndex = 77
        Me.Label25.Text = "Tên Khách Hàng"
        Me.Label25.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'gridSearch
        '
        Me.gridSearch.AutoGenerateColumns = False
        DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter
        DataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control
        DataGridViewCellStyle4.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        DataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText
        DataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight
        DataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText
        DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
        Me.gridSearch.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle4
        Me.gridSearch.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
        Me.gridSearch.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.dsphutrachS, Me.giaychungnhanS, Me.giayphepS, Me.dientichS, Me.ma_nhacungcapS, Me.ten_nhacungcapS, Me.diachi_nhacungcapS, Me.ma_nhomS, Me.maso_thueS, Me.dienthoaiS, Me.faxS, Me.emailS, Me.so_taikhoanS, Me.ma_quocgiaS, Me.ma_mienS, Me.ma_tinhS, Me.ma_quanS, Me.ma_nganhangS, Me.matructhuocS, Me.tentructhuocS})
        Me.gridSearch.DataMember = "tbl_khachhangSearch"
        Me.gridSearch.DataSource = Me.DataSetSearchBindingSource
        Me.gridSearch.Location = New System.Drawing.Point(5, 87)
        Me.gridSearch.Name = "gridSearch"
        Me.gridSearch.RowHeadersWidth = 25
        Me.gridSearch.Size = New System.Drawing.Size(875, 452)
        Me.gridSearch.TabIndex = 76
        '
        'dsphutrachS
        '
        Me.dsphutrachS.DataPropertyName = "dsphutrach"
        Me.dsphutrachS.HeaderText = "dsphutrach"
        Me.dsphutrachS.Name = "dsphutrachS"
        Me.dsphutrachS.Visible = False
        '
        'giaychungnhanS
        '
        Me.giaychungnhanS.DataPropertyName = "giaychungnhan"
        Me.giaychungnhanS.HeaderText = "giaychungnhan"
        Me.giaychungnhanS.Name = "giaychungnhanS"
        Me.giaychungnhanS.Visible = False
        '
        'giayphepS
        '
        Me.giayphepS.DataPropertyName = "giayphep"
        Me.giayphepS.HeaderText = "giayphep"
        Me.giayphepS.Name = "giayphepS"
        Me.giayphepS.Visible = False
        '
        'dientichS
        '
        Me.dientichS.DataPropertyName = "dientich"
        Me.dientichS.HeaderText = "dientich"
        Me.dientichS.Name = "dientichS"
        Me.dientichS.Visible = False
        '
        'ma_nhacungcapS
        '
        Me.ma_nhacungcapS.DataPropertyName = "ma_nhacungcap"
        Me.ma_nhacungcapS.HeaderText = "Mã KH"
        Me.ma_nhacungcapS.Name = "ma_nhacungcapS"
        '
        'ten_nhacungcapS
        '
        Me.ten_nhacungcapS.DataPropertyName = "ten_nhacungcap"
        Me.ten_nhacungcapS.HeaderText = "Tên KH"
        Me.ten_nhacungcapS.Name = "ten_nhacungcapS"
        Me.ten_nhacungcapS.Width = 210
        '
        'diachi_nhacungcapS
        '
        Me.diachi_nhacungcapS.DataPropertyName = "diachi_nhacungcap"
        Me.diachi_nhacungcapS.HeaderText = "Địa chỉ"
        Me.diachi_nhacungcapS.Name = "diachi_nhacungcapS"
        Me.diachi_nhacungcapS.Width = 150
        '
        'ma_nhomS
        '
        Me.ma_nhomS.DataPropertyName = "ma_nhom"
        DataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter
        Me.ma_nhomS.DefaultCellStyle = DataGridViewCellStyle5
        Me.ma_nhomS.HeaderText = "Nhóm"
        Me.ma_nhomS.Name = "ma_nhomS"
        Me.ma_nhomS.Width = 50
        '
        'maso_thueS
        '
        Me.maso_thueS.DataPropertyName = "maso_thue"
        Me.maso_thueS.HeaderText = "MST"
        Me.maso_thueS.Name = "maso_thueS"
        '
        'dienthoaiS
        '
        Me.dienthoaiS.DataPropertyName = "dienthoai"
        Me.dienthoaiS.HeaderText = "ĐT"
        Me.dienthoaiS.Name = "dienthoaiS"
        '
        'faxS
        '
        Me.faxS.DataPropertyName = "fax"
        Me.faxS.HeaderText = "Fax"
        Me.faxS.Name = "faxS"
        Me.faxS.Width = 50
        '
        'emailS
        '
        Me.emailS.DataPropertyName = "email"
        Me.emailS.HeaderText = "Email"
        Me.emailS.Name = "emailS"
        Me.emailS.Width = 50
        '
        'so_taikhoanS
        '
        Me.so_taikhoanS.DataPropertyName = "so_taikhoan"
        Me.so_taikhoanS.HeaderText = "so_taikhoan"
        Me.so_taikhoanS.Name = "so_taikhoanS"
        Me.so_taikhoanS.Visible = False
        '
        'ma_quocgiaS
        '
        Me.ma_quocgiaS.DataPropertyName = "ma_quocgia"
        Me.ma_quocgiaS.HeaderText = "ma_quocgia"
        Me.ma_quocgiaS.Name = "ma_quocgiaS"
        Me.ma_quocgiaS.Visible = False
        '
        'ma_mienS
        '
        Me.ma_mienS.DataPropertyName = "ma_mien"
        Me.ma_mienS.HeaderText = "ma_mien"
        Me.ma_mienS.Name = "ma_mienS"
        Me.ma_mienS.Visible = False
        '
        'ma_tinhS
        '
        Me.ma_tinhS.DataPropertyName = "ma_tinh"
        Me.ma_tinhS.HeaderText = "ma_tinh"
        Me.ma_tinhS.Name = "ma_tinhS"
        Me.ma_tinhS.Visible = False
        '
        'ma_quanS
        '
        Me.ma_quanS.DataPropertyName = "ma_quan"
        Me.ma_quanS.HeaderText = "ma_quan"
        Me.ma_quanS.Name = "ma_quanS"
        Me.ma_quanS.Visible = False
        '
        'ma_nganhangS
        '
        Me.ma_nganhangS.DataPropertyName = "ma_nganhang"
        Me.ma_nganhangS.HeaderText = "ma_nganhang"
        Me.ma_nganhangS.Name = "ma_nganhangS"
        Me.ma_nganhangS.Visible = False
        '
        'matructhuocS
        '
        Me.matructhuocS.DataPropertyName = "matructhuoc"
        Me.matructhuocS.HeaderText = "matructhuoc"
        Me.matructhuocS.Name = "matructhuocS"
        Me.matructhuocS.Visible = False
        '
        'tentructhuocS
        '
        Me.tentructhuocS.DataPropertyName = "tentructhuoc"
        Me.tentructhuocS.HeaderText = "tentructhuoc"
        Me.tentructhuocS.Name = "tentructhuocS"
        Me.tentructhuocS.Visible = False
        '
        'DataSetSearchBindingSource
        '
        Me.DataSetSearchBindingSource.DataSource = Me.DataSetSearch
        Me.DataSetSearchBindingSource.Position = 0
        '
        'DataSetSearch
        '
        Me.DataSetSearch.DataSetName = "DataSetSearch"
        Me.DataSetSearch.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
        '
        'gridViewSearch1
        '
        Me.gridViewSearch1.AllowUserToAddRows = False
        Me.gridViewSearch1.AllowUserToDeleteRows = False
        Me.gridViewSearch1.AllowUserToResizeColumns = False
        Me.gridViewSearch1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.gridViewSearch1.AutoGenerateColumns = False
        Me.gridViewSearch1.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells
        Me.gridViewSearch1.BackgroundColor = System.Drawing.Color.LightBlue
        DataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter
        DataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control
        DataGridViewCellStyle6.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        DataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText
        DataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight
        DataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText
        DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
        Me.gridViewSearch1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle6
        Me.gridViewSearch1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
        Me.gridViewSearch1.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.ma, Me.ten})
        Me.gridViewSearch1.DataSource = Me.TblsearchBindingSource
        Me.gridViewSearch1.Location = New System.Drawing.Point(586, 95)
        Me.gridViewSearch1.Name = "gridViewSearch1"
        Me.gridViewSearch1.RowHeadersVisible = False
        Me.gridViewSearch1.Size = New System.Drawing.Size(41, 23)
        Me.gridViewSearch1.TabIndex = 1088
        Me.gridViewSearch1.Visible = False
        '
        'ma
        '
        Me.ma.DataPropertyName = "ma"
        Me.ma.HeaderText = "Mã"
        Me.ma.Name = "ma"
        Me.ma.ReadOnly = True
        Me.ma.Width = 90
        '
        'ten
        '
        Me.ten.DataPropertyName = "ten"
        Me.ten.HeaderText = "tên đơn vị"
        Me.ten.Name = "ten"
        Me.ten.ReadOnly = True
        Me.ten.Width = 360
        '
        'TblsearchBindingSource
        '
        Me.TblsearchBindingSource.DataMember = "tbl_search"
        Me.TblsearchBindingSource.DataSource = Me.DataSetSearch
        '
        'Label35
        '
        Me.Label35.Location = New System.Drawing.Point(19, 99)
        Me.Label35.Name = "Label35"
        Me.Label35.Size = New System.Drawing.Size(22, 19)
        Me.Label35.TabIndex = 1087
        Me.Label35.Text = "Mã Trực thuộc"
        Me.Label35.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        Me.Label35.Visible = False
        '
        'txtMatructhuoc
        '
        Me.txtMatructhuoc.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtMatructhuoc.Location = New System.Drawing.Point(47, 99)
        Me.txtMatructhuoc.MaxLength = 100
        Me.txtMatructhuoc.Name = "txtMatructhuoc"
        Me.txtMatructhuoc.Size = New System.Drawing.Size(26, 22)
        Me.txtMatructhuoc.TabIndex = 1
        Me.txtMatructhuoc.Visible = False
        '
        'txtDienTich
        '
        Me.txtDienTich.AccessibleRole = System.Windows.Forms.AccessibleRole.OutlineButton
        Me.txtDienTich.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtDienTich.Location = New System.Drawing.Point(622, 95)
        Me.txtDienTich.MaxLength = 50
        Me.txtDienTich.Name = "txtDienTich"
        Me.txtDienTich.Size = New System.Drawing.Size(12, 22)
        Me.txtDienTich.TabIndex = 2
        Me.txtDienTich.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
        Me.txtDienTich.Visible = False
        '
        'Label29
        '
        Me.Label29.Location = New System.Drawing.Point(593, 97)
        Me.Label29.Name = "Label29"
        Me.Label29.Size = New System.Drawing.Size(23, 19)
        Me.Label29.TabIndex = 122
        Me.Label29.Text = "Diện tích"
        Me.Label29.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        Me.Label29.Visible = False
        '
        'Label28
        '
        Me.Label28.Location = New System.Drawing.Point(640, 95)
        Me.Label28.Name = "Label28"
        Me.Label28.Size = New System.Drawing.Size(20, 19)
        Me.Label28.TabIndex = 121
        Me.Label28.Text = "DS Phụ trách"
        Me.Label28.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        Me.Label28.Visible = False
        '
        'Label27
        '
        Me.Label27.Location = New System.Drawing.Point(689, 92)
        Me.Label27.Name = "Label27"
        Me.Label27.Size = New System.Drawing.Size(20, 22)
        Me.Label27.TabIndex = 120
        Me.Label27.Text = "Giấy CNHND"
        Me.Label27.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        Me.Label27.Visible = False
        '
        'Label26
        '
        Me.Label26.Location = New System.Drawing.Point(735, 92)
        Me.Label26.Name = "Label26"
        Me.Label26.Size = New System.Drawing.Size(19, 22)
        Me.Label26.TabIndex = 119
        Me.Label26.Text = "Giấy ĐKKD"
        Me.Label26.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        Me.Label26.Visible = False
        '
        'txtDSPhuTrach
        '
        Me.txtDSPhuTrach.AccessibleRole = System.Windows.Forms.AccessibleRole.OutlineButton
        Me.txtDSPhuTrach.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtDSPhuTrach.Location = New System.Drawing.Point(664, 92)
        Me.txtDSPhuTrach.MaxLength = 50
        Me.txtDSPhuTrach.Name = "txtDSPhuTrach"
        Me.txtDSPhuTrach.Size = New System.Drawing.Size(19, 22)
        Me.txtDSPhuTrach.TabIndex = 3
        Me.txtDSPhuTrach.Visible = False
        '
        'txtChungNhan
        '
        Me.txtChungNhan.AccessibleRole = System.Windows.Forms.AccessibleRole.OutlineButton
        Me.txtChungNhan.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtChungNhan.Location = New System.Drawing.Point(715, 92)
        Me.txtChungNhan.MaxLength = 50
        Me.txtChungNhan.Name = "txtChungNhan"
        Me.txtChungNhan.Size = New System.Drawing.Size(14, 22)
        Me.txtChungNhan.TabIndex = 5
        Me.txtChungNhan.Visible = False
        '
        'txtDangKy
        '
        Me.txtDangKy.AccessibleRole = System.Windows.Forms.AccessibleRole.OutlineButton
        Me.txtDangKy.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtDangKy.Location = New System.Drawing.Point(780, 95)
        Me.txtDangKy.MaxLength = 50
        Me.txtDangKy.Name = "txtDangKy"
        Me.txtDangKy.Size = New System.Drawing.Size(16, 22)
        Me.txtDangKy.TabIndex = 7
        Me.txtDangKy.Visible = False
        '
        'txttentructhuoc
        '
        Me.txttentructhuoc.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txttentructhuoc.Location = New System.Drawing.Point(550, 123)
        Me.txttentructhuoc.MaxLength = 100
        Me.txttentructhuoc.Name = "txttentructhuoc"
        Me.txttentructhuoc.Size = New System.Drawing.Size(20, 22)
        Me.txttentructhuoc.TabIndex = 1089
        Me.txttentructhuoc.Visible = False
        '
        'frmkhachhang
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.BackColor = System.Drawing.Color.LightBlue
        Me.ClientSize = New System.Drawing.Size(892, 603)
        Me.Controls.Add(Me.TabMain)
        Me.Controls.Add(Me.gridViewSearch1)
        Me.Controls.Add(Me.Label26)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.txtDangKy)
        Me.Controls.Add(Me.Label27)
        Me.Controls.Add(Me.txtChungNhan)
        Me.Controls.Add(Me.Label28)
        Me.Controls.Add(Me.txtDienTich)
        Me.Controls.Add(Me.txtDSPhuTrach)
        Me.Controls.Add(Me.Label18)
        Me.Controls.Add(Me.CboQuan)
        Me.Controls.Add(Me.Label29)
        Me.Controls.Add(Me.TxtTen_Quan)
        Me.Controls.Add(Me.CboKhuVuc)
        Me.Controls.Add(Me.TxtTaiKhoan)
        Me.Controls.Add(Me.TxtTen_KhuVuc)
        Me.Controls.Add(Me.Label16)
        Me.Controls.Add(Me.Label17)
        Me.Controls.Add(Me.txttentructhuoc)
        Me.Controls.Add(Me.txtMatructhuoc)
        Me.Controls.Add(Me.Label35)
        Me.Controls.Add(Me.CboQuocGia)
        Me.Controls.Add(Me.CboNganHang)
        Me.Controls.Add(Me.Label15)
        Me.Controls.Add(Me.txtTen_NganHang)
        Me.Controls.Add(Me.CboTinh)
        Me.Controls.Add(Me.TxtTen_QuocGia)
        Me.Controls.Add(Me.TxtTen_Tinh)
        Me.Controls.Add(Me.Label12)
        Me.Controls.Add(Me.Label19)
        Me.Controls.Add(Me.TxtTen_Nhom)
        Me.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Name = "frmkhachhang"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = " Danh Muc Khach Hang"
        Me.ContextMenuStrip1.ResumeLayout(False)
        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DataSetFormDonBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DataSetForm_Don, System.ComponentModel.ISupportInitialize).EndInit()
        Me.TabMain.ResumeLayout(False)
        Me.TabThongtin.ResumeLayout(False)
        Me.TabThongtin.PerformLayout()
        Me.TabTimKiem.ResumeLayout(False)
        Me.TabTimKiem.PerformLayout()
        CType(Me.gridSearch, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DataSetSearchBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DataSetSearch, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.gridViewSearch1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.TblsearchBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub

#End Region
    Private dataNhomKH, dataNganhang, dataQuan, dataTinh, dataKhuvuc, dataQuocgia As DataTable
    Private da As MySqlDataAdapter
    Dim myDT As New DataTable
    Dim strError As String = ""
    Dim myform As Form
    Dim sqlQuery As String = ""
    Dim flag As Boolean = False
    'add
    Private Sub autoMaKhachHang()
        sqlQuery = "select max(ma_nhacungcap) + 1 from  tbl_khachhang;"
        Dim tmp_khachhang As DataTable = moduleDatabaseConn.GetDataTable(sqlQuery)
        Try
            Me.txtMa.Text = tmp_khachhang.Rows.Item(0).Item(0)
        Catch ex As Exception
            Me.txtMa.Focus()
        End Try
    End Sub
    'end
    Sub SetclearData()
        'cboMaNhom.Text = ""
        'txtTenNhom.Text = ""
        txtMa.Text = ""
        Me.txtChungNhan.Text = ""
        Me.txtDangKy.Text = ""
        Me.txtDienTich.Text = "0"
        Me.txtDSPhuTrach.Text = ""
        txtTen.Text = ""
        txtMaSoThue.Text = ""
        txtDiaChi.Text = ""
        TxtDienThoai.Text = ""
        TxtFax.Text = ""
        TxtEmail.Text = ""
        CboNganHang.Text = ""
        txtTen_NganHang.Text = ""
        TxtTaiKhoan.Text = ""
        CboQuocGia.Text = ""
        TxtTen_QuocGia.Text = ""
        CboKhuVuc.Text = ""
        TxtTen_KhuVuc.Text = ""
        CboQuan.Text = ""
        TxtTen_Quan.Text = ""
        CboTinh.Text = ""
        TxtTen_Tinh.Text = ""
    End Sub
    Private Sub txtMaSearch_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtMaSearch.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.txtTenSearch.Focus()
        End If
    End Sub
    Private Sub txtTenSearch_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtTenSearch.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.btnTimKiem.Focus()
        End If
    End Sub
    '15 03
    Private Sub txtMa_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtMa.DoubleClick
        Dim myForm As New frmThayDoiMaSo
        myForm.setArg(10)
        myForm.setTable("tbl_khachhang")
        myForm.setMa("ma_nhacungcap")
        myForm.setMaChungTu(Me.txtMa.Text.Trim)
        myForm.Show()
        myForm.setFrmKhachHang(Me)
    End Sub
    Private Sub txtMa_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtMa.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.txtTen.Focus()
        End If
    End Sub

    Private Sub txtTen_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtTen.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.txtDiaChi.Focus()
        End If
    End Sub
    Private Sub txtDiaChi_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtDiaChi.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.TxtDienThoai.Focus()
        End If
    End Sub
    Private Sub TxtDienThoai_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TxtDienThoai.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.TxtFax.Focus()
        End If
    End Sub
    Private Sub TxtFax_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TxtFax.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.txtMaSoThue.Focus()
        End If
    End Sub
    Private Sub txtMaSoThue_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtMaSoThue.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.TxtEmail.Focus()
        End If
    End Sub
    Private Sub TxtEmail_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TxtEmail.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.cboMaNhom.Focus()
        End If
    End Sub

    Private Sub cboMaNhom_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cboMaNhom.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.btnSave.Focus()
        End If
    End Sub

    Private Sub btnSave_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles btnSave.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.btnNew.Focus()
        End If
    End Sub
    Private Sub btnNew_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles btnNew.KeyDown
        If e.KeyCode = Keys.Enter Then
            Me.txtMa.Focus()
        End If
    End Sub
    Private Sub frmkhachhang_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
        'tao moi
        If e.KeyCode = (e.Control And Keys.N) Then
            SetclearData()
            ' Me.autoMaKhachHang()
            txtMa.Focus()
        End If
        'Luu
        If e.KeyCode = (e.Control And Keys.S) Then
            luu()
        End If
        'Xoa
        If e.KeyCode = (e.Control And Keys.D) Then
            xoa()
        End If
        'Thoat
        If e.KeyCode = (e.Control And Keys.Q) Then
            Me.Close()
        End If
        If e.KeyCode = (e.Control And Keys.P) Then
            FrmCrKhachHang.Show()
        End If
    End Sub

    Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
        luu()
    End Sub
    Private Sub luu()
        ' Kiểm tra có nhập liệu chưa ?
        Dim txtMaKH = Me.txtMa.Text.Trim
        Dim txtTenKH = Me.txtTen.Text.Trim
        If Me.checkInput(txtMaKH, txtTenKH) Then
            sqlQuery = "SELECT ma_nhacungcap FROM tbl_khachhang WHERE ma_nhacungcap = '" & txtMaKH & "'"
            Dim existedMamon As Integer = moduleDatabaseConn.CheckRecordExisted(sqlQuery)
            If existedMamon = 1 Then ' Update record
                'Khanh Ky 2008 10 23
                'add 
                moduleConstants.MessageWarning = " Mã khách hàng đã tồn tại , bạn có muốn cập nhật không  ?"
                If MessageBox.Show(moduleConstants.MessageWarning, globalVariale.msgTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = MsgBoxResult.Yes Then
                    If Me.cboMaNhom.Text.Trim = "ALL" Then
                        MessageBox.Show("Không cập nhật được khi chọn Mã Nhóm là ALL !!!")
                        Me.cboMaNhom.Focus()
                    Else
                        sqlQuery = "UPDATE tbl_khachhang "
                        sqlQuery += "SET "
                        sqlQuery += "ma_nhacungcap = '" & txtMaKH & "'"
                        sqlQuery += ", ten_nhacungcap = '" & Me.txtTen.Text.Trim & "'"
                        sqlQuery += ", diachi_nhacungcap = '" & Me.txtDiaChi.Text.Trim & "'"
                        sqlQuery += ", maso_thue = '" & Me.txtMaSoThue.Text.Trim & "'"
                        sqlQuery += ", dienthoai = '" & Me.TxtDienThoai.Text.Trim & "'"
                        sqlQuery += ", fax = '" & Me.TxtFax.Text.Trim & "'"
                        sqlQuery += ", email = '" & Me.TxtEmail.Text.Trim & "'"
                        sqlQuery += ", so_taikhoan = '" & Me.TxtTaiKhoan.Text.Trim & "'"
                        sqlQuery += ", ma_quocgia = '" & Me.CboQuocGia.Text.Trim & "'"
                        sqlQuery += ", ma_mien = '" & Me.CboKhuVuc.Text.Trim & "'"
                        sqlQuery += ", ma_tinh = '" & Me.CboTinh.Text.Trim & "'"
                        sqlQuery += ", ma_quan = '" & Me.CboQuan.Text.Trim & "'"
                        sqlQuery += ", ma_nganhang = '" & Me.CboNganHang.Text.Trim & "'"
                        sqlQuery += ", matructhuoc = '" & Me.txtMatructhuoc.Text.Trim & "'"
                        sqlQuery += ", tentructhuoc = '" & Me.txttentructhuoc.Text.Trim & "'"
                        sqlQuery += ", dsphutrach = '" & Me.txtDSPhuTrach.Text.Trim & "'"
                        sqlQuery += ", giaychungnhan = '" & Me.txtChungNhan.Text.Trim & "'"
                        sqlQuery += ", giayphep = '" & Me.txtDangKy.Text.Trim & "'"
                        sqlQuery += ", dientich = '" & Me.txtDienTich.Text.Trim & "'"
                        sqlQuery += ", ma_nhom = '" & Me.cboMaNhom.Text.Trim & "'"
                        sqlQuery += " WHERE ma_nhacungcap = '" & txtMaKH & "'"
                        Dim updated As Integer = moduleDatabaseConn.ExecuteNonQuery(sqlQuery)
                        If updated = 1 Then
                            MessageBox.Show("Cập nhật thông tin thành công !")
                            Me.loadDanhSachKhachhang()
                        Else
                            'MessageBox.Show("Cập nhật thông tin không thành công: " & globalVariale.sqlMsgError)
                        End If
                    End If
                End If

            Else
                If existedMamon = 0 Then ' Insert record
                    If Me.cboMaNhom.Text.Trim = "ALL" Then
                        MessageBox.Show("Không cập nhật được khi chọn Mã Nhóm là ALL !!!")
                        Me.cboMaNhom.Focus()
                    Else
                        sqlQuery = "INSERT INTO tbl_khachhang "
                        sqlQuery += "(ma_nhacungcap, ten_nhacungcap,diachi_nhacungcap,maso_thue,dienthoai,fax,"
                        sqlQuery += "email,so_taikhoan,ma_quocgia,ma_mien,ma_tinh,ma_quan,"
                        sqlQuery += "ma_nganhang,dsphutrach,giaychungnhan,giayphep,dientich,ma_nhom,matructhuoc,tentructhuoc) "
                        sqlQuery += "VALUES "
                        sqlQuery += "("
                        sqlQuery += " '" & txtMaKH & "',"
                        sqlQuery += " '" & Me.txtTen.Text.Trim & "',"
                        sqlQuery += "'" & Me.txtDiaChi.Text.Trim & "',"
                        sqlQuery += "'" & Me.txtMaSoThue.Text.Trim & "',"
                        sqlQuery += " '" & Me.TxtDienThoai.Text.Trim & "',"
                        sqlQuery += "'" & Me.TxtFax.Text.Trim & "',"
                        sqlQuery += " '" & Me.TxtEmail.Text.Trim & "',"
                        sqlQuery += " '" & Me.TxtTaiKhoan.Text.Trim & "',"
                        sqlQuery += " '" & Me.CboQuocGia.Text.Trim & "',"
                        sqlQuery += " '" & Me.CboKhuVuc.Text.Trim & "',"
                        sqlQuery += " '" & Me.CboTinh.Text.Trim & "',"
                        sqlQuery += " '" & Me.CboQuan.Text.Trim & "',"
                        sqlQuery += " '" & Me.CboNganHang.Text.Trim & "',"
                        sqlQuery += " '" & Me.txtDSPhuTrach.Text.Trim & "',"
                        sqlQuery += " '" & Me.txtChungNhan.Text.Trim & "',"
                        sqlQuery += " '" & Me.txtDangKy.Text.Trim & "',"
                        sqlQuery += " '" & Me.txtDienTich.Text.Trim & "',"
                        sqlQuery += " '" & Me.cboMaNhom.Text.Trim & "',"
                        sqlQuery += " '" & Me.txtMatructhuoc.Text.Trim & "',"
                        sqlQuery += " '" & Me.txttentructhuoc.Text.Trim & "'"
                        sqlQuery += ")"
                        Dim inserted As Integer = moduleDatabaseConn.ExecuteNonQuery(sqlQuery)
                        If inserted = 1 Then
                            MessageBox.Show("Thêm thông tin thành công !")
                            Me.loadDanhSachKhachhang()
                        Else
                            'MessageBox.Show("Thêm thông tin không thành công: " & globalVariale.sqlMsgError)
                        End If
                    End If
                Else ' SQLExeption: existedMaQuocGia = -1
                    MessageBox.Show("Lấy dữ liệu bị lỗi: " & globalVariale.sqlMsgError, "Lấy dữ liệu", MessageBoxButtons.OK, MessageBoxIcon.Warning)
                End If
            End If
        End If


    End Sub

    Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNew.Click
        SetclearData()
        'Me.autoMaKhachHang()
        txtMa.Focus()
    End Sub

    Private Sub btnDelete1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete1.Click
        xoa()
    End Sub
    Private Sub xoa()
        If Me.txtMa.Text = "" Then
            MessageBox.Show("Bạn chưa chọn Mã để xóa !")
        Else
            moduleConstants.MessageWarning = "Bạn có muốn xóa " & txtMa.Text & " ?"
            If MessageBox.Show(moduleConstants.MessageWarning, globalVariale.msgTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = MsgBoxResult.Yes Then
                Dim sqlQuery As String = "DELETE FROM tbl_khachhang WHERE ma_nhacungcap = '" & txtMa.Text & "'"
                Dim deleting As Integer = moduleDatabaseConn.ExecuteNonQuery(sqlQuery)
                '15 03 2011
                'xóa thêm các bảng khác
                sqlQuery = "DELETE FROM tbl_nhap_hanghoa WHERE ma_nhacungcap = '" & txtMa.Text & "'"
                moduleDatabaseConn.ExecuteNonQuery(sqlQuery)
                sqlQuery = "DELETE FROM tbl_xuat_hanghoa WHERE ma_phu = '" & txtMa.Text & "'"
                moduleDatabaseConn.ExecuteNonQuery(sqlQuery)
                'end
                If deleting = 1 Then
                    MessageBox.Show("Xóa thông tin thành công !")
                    Me.loadDanhSachKhachhang()
                    SetclearData()
                Else
                    MessageBox.Show("Xóa thông tin không thành công: " & globalVariale.sqlMsgError)
                End If
            End If
        End If
    End Sub


    Private Sub frmkhachhang_load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
        moduleUtils.setDinhDangVietNam()
        Me.KeyPreview = True
        SetclearData()
        gridViewSearch1.Visible = False
        flag = True
        'flag = True
        Me.loadDanhSachNhomKH()
        Me.loadDanhSachNhomNganHang()
        Me.loadDanhSachNhomQuocGia()
        Me.loadDanhSachNhomKhuVuc()
        Me.loadDanhSachNhomTinh()
        Me.loadDanhSachNhomQuan()
        Me.loadDanhSachKhachhang()
        'roles
        edit = moduleConstants.edit
        If edit = 0 Then
            Me.btnNew.Enabled = False
            Me.btnSave.Enabled = False
            Me.btnDelete1.Enabled = False
            Me.BtnIn.Enabled = False
            Me.DataGridView1.ReadOnly = True

        End If
    End Sub
    Private Sub BtnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnClose.Click
        Me.Close()
    End Sub
    Function checkInput(ByVal maLop As String, ByVal tenLop As String) As Boolean
        Dim result As Boolean = True
        If maLop = "" Then
            MessageBox.Show("Bạn chưa chọn Mã Khách hàng !")
            result = False
        End If
        If tenLop = "" Then
            MessageBox.Show("Bạn chưa nhập tên Khách hàng!")
            result = False
        End If
        Return result
    End Function
    Private Sub loadDanhSachKhachhang()

        sqlQuery = " select * from tbl_khachhang "
        Me.DataGridView1.DataSource = moduleDatabaseConn.GetDataTable(sqlQuery)
        Me.LblRecords.Text = Me.DataGridView1.Rows.Count & " mẫu tin"
        'Else
        'sqlQuery = " select * from tbl_khachhang where ma_nhom ='" & Me.cboMaNhom.Text.Trim & "'"
        'Me.DataGridView1.DataSource = moduleDatabaseConn.GetDataTable(sqlQuery)
        'Me.LblRecords.Text = Me.DataGridView1.Rows.Count & " mẫu tin"
        'End If
    End Sub
    Private Sub loadDanhSachNhomKH()
        Try
            Dim sqlQuery As String = ""
            sqlQuery = "SELECT ma_nhom_khachhang, ten_nhom_khachhang FROM tbl_nhom_khachhang ORDER BY ma_nhom_khachhang"
            dataNhomKH = moduleDatabaseConn.GetDataTable(sqlQuery)
            cboMaNhom.Items.Clear()
            cboMaNhom.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
            cboMaNhom.ColumnNum = 2
            cboMaNhom.ColumnWidth = "100;250"
            cboMaNhom.HighlightBorderColor = Color.Black
            cboMaNhom.GridLineHorizontal = True
            cboMaNhom.GridLineVertical = True
            cboMaNhom.ItemHeight = 17
            cboMaNhom.DropDownHeight = 300
            cboMaNhom.SourceDataTable = dataNhomKH
            cboMaNhom.SelectedIndex = 0
        Catch ex As Exception
            MessageBox.Show("Bạn chưa nhập thông tin nhóm khách hàng!")
        End Try
    End Sub

    Private Sub loadDanhSachNhomNganHang()
        Try
            Dim sqlQuery As String = ""
            sqlQuery = "SELECT ma_nganhang, ten_nganhang FROM tbl_nganhang ORDER BY ma_nganhang"
            dataNganhang = moduleDatabaseConn.GetDataTable(sqlQuery)
            CboNganHang.Items.Clear()
            CboNganHang.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
            CboNganHang.ColumnNum = 2
            CboNganHang.ColumnWidth = "100;250"
            CboNganHang.HighlightBorderColor = Color.Black
            CboNganHang.GridLineHorizontal = True
            CboNganHang.GridLineVertical = True
            CboNganHang.ItemHeight = 17
            CboNganHang.DropDownHeight = 300
            CboNganHang.SourceDataTable = dataNganhang
            CboNganHang.SelectedIndex = 0
        Catch ex As Exception
            MessageBox.Show("Bạn chưa nhập thông tin Ngân hàng!")
        End Try
    End Sub
    Private Sub CboNganHang_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CboNganHang.SelectedIndexChanged
        Try
            Me.txtTen_NganHang.Text = Me.CboNganHang.SelectedItem.Col2
        Catch ex As Exception
            Me.txtTen_NganHang.Text = ""
        End Try
    End Sub
    Private Sub loadDanhSachNhomQuocGia()
        Try
            Dim sqlQuery As String = ""
            sqlQuery = "SELECT ma_quocgia, ten_quocgia FROM tbl_quocgia ORDER BY ma_quocgia"
            dataQuocgia = moduleDatabaseConn.GetDataTable(sqlQuery)
            CboQuocGia.Items.Clear()
            CboQuocGia.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
            CboQuocGia.ColumnNum = 2
            CboQuocGia.ColumnWidth = "100;250"
            CboQuocGia.HighlightBorderColor = Color.Black
            CboQuocGia.GridLineHorizontal = True
            CboQuocGia.GridLineVertical = True
            CboQuocGia.ItemHeight = 17
            CboQuocGia.DropDownHeight = 300
            CboQuocGia.SourceDataTable = dataQuocgia
            CboQuocGia.SelectedIndex = 0
        Catch ex As Exception
            MessageBox.Show("Bạn chưa nhập thông tin Quốc gia!")
        End Try
    End Sub
    Private Sub CboQuocGia_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CboQuocGia.SelectedIndexChanged
        Try
            Me.TxtTen_QuocGia.Text = Me.CboQuocGia.SelectedItem.Col2
        Catch ex As Exception
            Me.TxtTen_QuocGia.Text = ""
        End Try
    End Sub
    Private Sub loadDanhSachNhomKhuVuc()
        Try
            Dim sqlQuery As String = ""
            sqlQuery = "SELECT ma_mien, ten_mien FROM tbl_mien ORDER BY ma_mien"
            dataKhuvuc = moduleDatabaseConn.GetDataTable(sqlQuery)
            CboKhuVuc.Items.Clear()
            CboKhuVuc.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
            CboKhuVuc.ColumnNum = 2
            CboKhuVuc.ColumnWidth = "100;250"
            CboKhuVuc.HighlightBorderColor = Color.Black
            CboKhuVuc.GridLineHorizontal = True
            CboKhuVuc.GridLineVertical = True
            CboKhuVuc.ItemHeight = 17
            CboKhuVuc.DropDownHeight = 300
            CboKhuVuc.SourceDataTable = dataKhuvuc
            CboKhuVuc.SelectedIndex = 0
        Catch ex As Exception
            MessageBox.Show("Bạn chưa nhập thông tin  Khu vực!")
        End Try
    End Sub
    Private Sub CboKhuVuc_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CboKhuVuc.SelectedIndexChanged
        Me.TxtTen_KhuVuc.Text = Me.CboKhuVuc.SelectedItem.Col2
        sqlQuery = "SELECT ma_tinh, ten_tinh FROM tbl_tinh where ma_mien ='" & Me.CboKhuVuc.Text & "'  ORDER BY ma_tinh"
        CboTinh.Items.Clear()
        CboTinh.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
        CboTinh.ColumnNum = 2
        CboTinh.ColumnWidth = "100;250"
        CboTinh.HighlightBorderColor = Color.Black
        CboTinh.GridLineHorizontal = True
        CboTinh.GridLineVertical = True
        CboTinh.ItemHeight = 17
        CboTinh.DropDownHeight = 300
        Me.CboTinh.SourceDataTable = moduleDatabaseConn.GetDataTable(sqlQuery)
        CboTinh.SelectedIndex = -1

        Dim sqlQuery1 As String = "SELECT ma_quan, ten_quan FROM tbl_quan where ma_tinh ='" & Me.CboTinh.Text & "'  ORDER BY ma_quan"
        CboQuan.Items.Clear()
        CboQuan.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
        CboQuan.ColumnNum = 2
        CboQuan.ColumnWidth = "100;250"
        CboQuan.HighlightBorderColor = Color.Black
        CboQuan.GridLineHorizontal = True
        CboQuan.GridLineVertical = True
        CboQuan.ItemHeight = 17
        CboQuan.DropDownHeight = 300
        Me.CboQuan.SourceDataTable = moduleDatabaseConn.GetDataTable(sqlQuery1)
        CboQuan.SelectedIndex = -1
    End Sub
    Private Sub loadDanhSachNhomTinh()
        Try
            Dim sqlQuery As String = ""
            sqlQuery = "SELECT ma_tinh, ten_tinh FROM tbl_tinh where ma_mien ='" & Me.CboKhuVuc.Text & "'  ORDER BY ma_tinh"
            dataTinh = moduleDatabaseConn.GetDataTable(sqlQuery)
            CboTinh.Items.Clear()
            CboTinh.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
            CboTinh.ColumnNum = 2
            CboTinh.ColumnWidth = "100;250"
            CboTinh.HighlightBorderColor = Color.Black
            CboTinh.GridLineHorizontal = True
            CboTinh.GridLineVertical = True
            CboTinh.ItemHeight = 17
            CboTinh.DropDownHeight = 300
            CboTinh.SourceDataTable = dataTinh
            CboTinh.SelectedIndex = 0
        Catch ex As Exception
            MessageBox.Show("Bạn chưa nhập thông tin Tỉnh !")
        End Try

    End Sub
    Private Sub CboTinh_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CboTinh.SelectedIndexChanged
        Try
            Me.TxtTen_Tinh.Text = Me.CboTinh.SelectedItem.Col2
        Catch ex As Exception
            Me.TxtTen_Tinh.Text = ""
        End Try
        Dim sqlQuery1 As String = "SELECT ma_quan, ten_quan FROM tbl_quan where ma_tinh ='" & Me.CboTinh.Text & "'  ORDER BY ma_quan"
        CboQuan.Items.Clear()
        CboQuan.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
        CboQuan.ColumnNum = 2
        CboQuan.ColumnWidth = "100;250"
        CboQuan.HighlightBorderColor = Color.Black
        CboQuan.GridLineHorizontal = True
        CboQuan.GridLineVertical = True
        CboQuan.ItemHeight = 17
        CboQuan.DropDownHeight = 300
        Me.CboQuan.SourceDataTable = moduleDatabaseConn.GetDataTable(sqlQuery1)
        CboQuan.SelectedIndex = -1
    End Sub
    Private Sub loadDanhSachNhomQuan()
        Try
            Dim sqlQuery As String = ""
            sqlQuery = "SELECT ma_quan, ten_quan FROM tbl_quan where ma_tinh ='" & Me.CboTinh.Text & "'  ORDER BY ma_quan"
            dataQuan = moduleDatabaseConn.GetDataTable(sqlQuery)
            CboQuan.Items.Clear()
            CboQuan.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
            CboQuan.ColumnNum = 2
            CboQuan.ColumnWidth = "100;250"
            CboQuan.HighlightBorderColor = Color.Black
            CboQuan.GridLineHorizontal = True
            CboQuan.GridLineVertical = True
            CboQuan.ItemHeight = 17
            CboQuan.DropDownHeight = 300
            CboQuan.SourceDataTable = dataQuan
            CboQuan.SelectedIndex = 0
        Catch ex As Exception
            ' MessageBox.Show("Bạn chưa nhập thông tin Quận!")
        End Try

    End Sub
    Private Sub CboQuan_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CboQuan.SelectedIndexChanged
        Try
            Me.TxtTen_Quan.Text = Me.CboQuan.SelectedItem.Col2
        Catch ex As Exception
            Me.TxtTen_Quan.Text = ""
        End Try
    End Sub
    Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick

        If e.RowIndex >= 0 And e.ColumnIndex >= 0 Then
            Dim iRow As Integer = Me.DataGridView1.CurrentRow.Index
            Me.txtMa.Text = Me.DataGridView1.Item(Me.colMa.Index, iRow).Value
            Me.txtTen.Text = Me.DataGridView1.Item(Me.colTen.Index, iRow).Value
            Me.txtDiaChi.Text = Me.DataGridView1.Item(Me.colDiaChi.Index, iRow).Value
            Me.txtMaSoThue.Text = Me.DataGridView1.Item(Me.colMST.Index, iRow).Value
            Me.TxtDienThoai.Text = Me.DataGridView1.Item(Me.colDT.Index, iRow).Value
            Me.TxtFax.Text = Me.DataGridView1.Item(Me.colFax.Index, iRow).Value
            Me.TxtEmail.Text = Me.DataGridView1.Item(Me.colEmail.Index, iRow).Value
            '  Me.TxtTaiKhoan.Text = Me.DataGridView1.Item(Me.colSoTK.Index, iRow).Value
            '  Me.txtMatructhuoc.Text = Me.DataGridView1.Item(Me.matructhuoc.Index, iRow).Value
            '  Me.txttentructhuoc.Text = Me.DataGridView1.Item(Me.tentructhuoc.Index, iRow).Value
            'combobox
            '   moduleUtils.setIndexComBo(Me.DataGridView1.Item(colMaQG.Index, iRow).Value, Me.CboQuocGia, dataQuocgia)
            '   moduleUtils.setIndexComBo(Me.DataGridView1.Item(colMaMien.Index, iRow).Value, Me.CboKhuVuc, dataKhuvuc)
            '   moduleUtils.setIndexComBo(Me.DataGridView1.Item(colMaTinh.Index, iRow).Value, Me.CboTinh, dataTinh)
            '   moduleUtils.setIndexComBo(Me.DataGridView1.Item(colMaQuan.Index, iRow).Value, Me.CboQuan, dataQuan)
            '   moduleUtils.setIndexComBo(Me.DataGridView1.Item(colMaNganHang.Index, iRow).Value, Me.CboNganHang, dataNganhang)
            moduleUtils.setIndexComBo(Me.DataGridView1.Item(colMaNhom.Index, iRow).Value, Me.cboMaNhom, dataNhomKH)
        End If
        gridViewSearch1.Visible = False
        flag = True
    End Sub
    Private Sub inphieu(ByVal flag As Integer)
        Dim report As FrmCrKhachHang = New FrmCrKhachHang
        report.setInBaocao(flag)
        report.Show()
    End Sub
    Private Sub BtnIn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnIn.Click
        inphieu(1)
    End Sub
    Private Sub cboMaNhom_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboMaNhom.SelectedIndexChanged
        Try
            Me.txtTenNhom.Text = Me.cboMaNhom.SelectedItem.Col2
            Me.loadDanhSachKhachhang()
        Catch ex As Exception
            Me.txtTenNhom.Text = ""
        End Try
    End Sub
    Private Sub CboNhom_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CboNhom.SelectedIndexChanged
        Try
            Me.TxtTen_Nhom.Text = Me.CboNhom.SelectedItem.Col2
            Me.loadDanhSachKhachhang()
        Catch ex As Exception
            Me.TxtTen_Nhom.Text = ""
        End Try
    End Sub
    Private Sub btnTimKiem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTimKiem.Click
        If Me.txtMaSearch.Text = "" And Me.txtTenSearch.Text = "" Then
            MessageBox.Show("Bạn phải nhập thông tin tìm kiếm !!!")
            Me.txtMaSearch.Focus()
        Else
            sqlQuery = "SELECT *  FROM tbl_khachhang "
            sqlQuery += " where ma_nhacungcap like '%" & Me.txtMaSearch.Text & "%'"
            sqlQuery += " and  ten_nhacungcap like '%" & Me.txtTenSearch.Text & "%'"
            Me.gridSearch.DataSource = moduleDatabaseConn.GetDataTable(sqlQuery)
            Me.LblRecordSearch.Text = Me.gridSearch.Rows.Count & " mẫu tin"
        End If
    End Sub

    Private Sub gridSearch_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles gridSearch.DoubleClick
        Me.TabMain.SelectedTab = Me.TabThongtin
        Dim iRow As Integer = Me.gridSearch.CurrentRow.Index
        Me.txtMa.Text = Me.gridSearch.Item(Me.ma_nhacungcapS.Index, iRow).Value
        Me.txtTen.Text = Me.gridSearch.Item(Me.ten_nhacungcapS.Index, iRow).Value
        Me.txtDiaChi.Text = Me.gridSearch.Item(Me.diachi_nhacungcapS.Index, iRow).Value
        Me.txtMaSoThue.Text = Me.gridSearch.Item(Me.maso_thueS.Index, iRow).Value
        Me.TxtDienThoai.Text = Me.gridSearch.Item(Me.dienthoaiS.Index, iRow).Value
        Me.TxtFax.Text = Me.gridSearch.Item(Me.faxS.Index, iRow).Value
        Me.TxtEmail.Text = Me.gridSearch.Item(Me.emailS.Index, iRow).Value
        Me.TxtTaiKhoan.Text = Me.gridSearch.Item(Me.so_taikhoanS.Index, iRow).Value
        Me.txtMatructhuoc.Text = Me.gridSearch.Item(Me.matructhuocS.Index, iRow).Value
        Me.txttentructhuoc.Text = Me.gridSearch.Item(Me.tentructhuocS.Index, iRow).Value
        Me.txtDSPhuTrach.Text = Me.gridSearch.Item(Me.dsphutrachS.Index, iRow).Value
        Me.txtChungNhan.Text = Me.gridSearch.Item(Me.giaychungnhanS.Index, iRow).Value
        Me.txtDangKy.Text = Me.gridSearch.Item(Me.giayphepS.Index, iRow).Value
        Me.txtDienTich.Text = Me.gridSearch.Item(Me.dientichS.Index, iRow).Value
        'combobox
        Me.CboQuocGia.Text = Me.gridSearch.Item(Me.ma_quocgiaS.Index, iRow).Value
        Me.CboKhuVuc.Text = Me.gridSearch.Item(Me.ma_mienS.Index, iRow).Value
        Me.CboTinh.Text = Me.gridSearch.Item(Me.ma_tinhS.Index, iRow).Value
        Me.CboQuan.Text = Me.gridSearch.Item(Me.ma_quanS.Index, iRow).Value
        Me.CboNganHang.Text = Me.gridSearch.Item(Me.ma_nganhangS.Index, iRow).Value
        Me.cboMaNhom.Text = Me.gridSearch.Item(Me.ma_nhomS.Index, iRow).Value

        Me.LblRecords.Text = Me.DataGridView1.Rows.Count & " mẫu tin"

        gridViewSearch1.Visible = False
        flag = True

    End Sub

    Private Sub InDSKháchHàngToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles InDSKháchHàngToolStripMenuItem.Click
        'in Ds Khach hang
        inphieu(0)
    End Sub

    Private Sub InDSKháchHàngGDPToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles InDSKháchHàngGDPToolStripMenuItem.Click
        'in Ds Khach hang GDP
        inphieu(1)

    End Sub

    Private Sub txtMatructhuoc_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles txtMatructhuoc.MouseClick
        Me.txtMatructhuoc.Text = ""
        flag = False
    End Sub

    Private Sub txtMatructhuoc_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtMatructhuoc.TextChanged
        If flag = True Then
            gridViewSearch1.Visible = False
        Else
            gridViewSearch1.Visible = True
            sqlQuery = "select ma_nhacungcap as ma , ten_nhacungcap as ten from tbl_khachhang "
            sqlQuery += " where ma_nhacungcap like '%" & Me.txtMatructhuoc.Text & "%' or ten_nhacungcap like '%" & Me.txtMatructhuoc.Text & "%'"
            gridViewSearch1.DataSource = moduleDatabaseConn.GetDataTable(sqlQuery)
        End If
    End Sub
    Private Sub gridViewSearch1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles gridViewSearch1.MouseClick
        Try
            Me.txtMatructhuoc.Text = Me.gridViewSearch1.Item(0, Me.gridViewSearch1.CurrentCell.RowIndex).Value.ToString
            Me.txttentructhuoc.Text = Me.gridViewSearch1.Item(1, Me.gridViewSearch1.CurrentCell.RowIndex).Value.ToString
            Me.gridViewSearch1.Visible = False
        Catch ex As Exception
        End Try
    End Sub
    Private Sub gridViewSearch1_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles gridViewSearch1.Enter
        Try
            Me.txtMatructhuoc.Text = Me.gridViewSearch1.Item(0, Me.gridViewSearch1.CurrentCell.RowIndex).Value.ToString
            Me.txttentructhuoc.Text = Me.gridViewSearch1.Item(1, Me.gridViewSearch1.CurrentCell.RowIndex).Value.ToString
            Me.gridViewSearch1.Visible = False
        Catch ex As Exception
        End Try
    End Sub
 
    Public Sub reloadForm()
        Me.loadDanhSachNhomKH()
        Me.loadDanhSachNhomNganHang()
        Me.loadDanhSachNhomQuocGia()
        Me.loadDanhSachNhomKhuVuc()
        Me.loadDanhSachNhomTinh()
        Me.loadDanhSachNhomQuan()
        Me.loadDanhSachKhachhang()
    End Sub
End Class


